Source Code
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| 0x60806040 | 22877244 | 255 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
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 0xF89D1045...4C9416036 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
RebalancerProxy
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 999999 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
import {Proxy} from "@openzeppelin/contracts/proxy/Proxy.sol";
import {IRebalancingManagerCore} from "../manager/IRebalancingManagerCore.sol";
import {RebalancerCore} from "./RebalancerCore.sol";
/**
* @title RebalancerProxy
* @author MetaLend
* @notice Proxy contract for the rebalancer
* @dev This contract is created to be used as a proxy for the rebalancer implementation managed by the rebalancing manager
*/
contract RebalancerProxy is RebalancerCore, Proxy {
/**
* @notice Constructor for the RebalancerProxy contract
* @param manager_ The address of the rebalancing manager
* @param owner_ The address of the owner of the rebalancer
*/
constructor(address manager_, address owner_) {
_rebalancingManager = manager_;
_owner = owner_;
emit RebalancerInitialized(address(this), _rebalancingManager, _owner);
}
/**
* @notice Returns the address of the implementation contract
* @dev This is used by the proxy `_fallback` function to delegate calls to the implementation contract
*/
function _implementation() internal view override returns (address implementation) {
return IRebalancingManagerCore(_rebalancingManager).getRebalancerImplementation();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)
pragma solidity ^0.8.20;
/**
* @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
* be specified by overriding the virtual {_implementation} function.
*
* Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
* different contract through the {_delegate} function.
*
* The success and return data of the delegated call will be returned back to the caller of the proxy.
*/
abstract contract Proxy {
/**
* @dev Delegates the current call to `implementation`.
*
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _delegate(address implementation) internal virtual {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
// Call the implementation.
// out and outsize are 0 because we don't know the size yet.
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
// Copy the returned data.
returndatacopy(0, 0, returndatasize())
switch result
// delegatecall returns 0 on error.
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
/**
* @dev This is a virtual function that should be overridden so it returns the address to which the fallback
* function and {_fallback} should delegate.
*/
function _implementation() internal view virtual returns (address);
/**
* @dev Delegates the current call to the address returned by `_implementation()`.
*
* This function does not return to its internal call site, it will return directly to the external caller.
*/
function _fallback() internal virtual {
_delegate(_implementation());
}
/**
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
* function in the contract matches the call data.
*/
fallback() external payable virtual {
_fallback();
}
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
/**
* @title IRebalancingManagerCore
* @author MetaLend
* @notice Core rebalancing manager interface to read rebalancer implementation
*/
interface IRebalancingManagerCore {
/**
* @notice Returns the address of the rebalancer implementation contract
* @dev Use this with _implementation() in the proxy contract to get the implementation address
* @return rebalancerImplementation The address of the rebalancer implementation contract
*/
function getRebalancerImplementation() external view returns (address rebalancerImplementation);
}// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
/**
* @title RebalancerCore
* @author MetaLend
* @notice Abstract contract that provides default storage layout for proxy and implementation contract
*/
abstract contract RebalancerCore {
/// @notice Manager contract providing rebalancing functionality and access control and implementation
address internal _rebalancingManager;
/// @notice Address of the owner of this rebalancer
address internal _owner;
/**
* @notice Emitted when the rebalancer is initialized
* @param rebalancer Address of this rebalancer
* @param manager Address of the rebalancing manager
* @param owner Address of the owner of this rebalancer
*/
event RebalancerInitialized(address indexed rebalancer, address indexed manager, address indexed owner);
}{
"metadata": {
"bytecodeHash": "none",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 999999
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris"
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"manager_","type":"address"},{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rebalancer","type":"address"},{"indexed":true,"internalType":"address","name":"manager","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"RebalancerInitialized","type":"event"},{"stateMutability":"payable","type":"fallback"}]Contract Creation Code
0x608060405234801561001057600080fd5b5060405161021338038061021383398101604081905261002f916100ac565b600080546001600160a01b038085166001600160a01b03199283168117845560018054928616929093168217909255604051909230917f5de57f6bdaa5661f65214dfcfe60688ade6759f45b42d2db77b8139e0571e9089190a450506100df565b80516001600160a01b03811681146100a757600080fd5b919050565b600080604083850312156100bf57600080fd5b6100c883610090565b91506100d660208401610090565b90509250929050565b610125806100ee6000396000f3fe608060405261000c61000e565b005b61001e610019610020565b6100b7565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9fda0eb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100b291906100db565b905090565b3660008037600080366000845af43d6000803e8080156100d6573d6000f35b3d6000fd5b6000602082840312156100ed57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461011157600080fd5b939250505056fea164736f6c6343000814000a0000000000000000000000000de1afc04a6ff8d12e27f942d7903b07cc58fec40000000000000000000000008867dbb565c035d58f90ef92a836c67aa63c1a97
Deployed Bytecode
0x608060405261000c61000e565b005b61001e610019610020565b6100b7565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9fda0eb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561008e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100b291906100db565b905090565b3660008037600080366000845af43d6000803e8080156100d6573d6000f35b3d6000fd5b6000602082840312156100ed57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461011157600080fd5b939250505056fea164736f6c6343000814000a
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 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.