Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 14200430 | 1056 days ago | IN | 0 ETH | 0.00230255 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
VTableBeacon
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* Copyright 2021 Babylon Finance. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.7.6; pragma abicoder v2; import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; /** * @title VTableBeacon * @notice Redirects calls to an implementation based on the method signature */ contract VTableBeacon is Ownable { struct ModuleDefinition { address implementation; bytes4[] selectors; } bytes4 private constant _FALLBACK_SIGN = 0xffffffff; // Mapping of methods signatures to their implementations mapping(bytes4 => address) public delegates; event VTableUpdate(bytes4 indexed selector, address oldImplementation, address newImplementation); function implementation(bytes4 _selector) external view virtual returns (address module) { module = delegates[_selector]; if (module != address(0)) return module; module = delegates[_FALLBACK_SIGN]; if (module != address(0)) return module; revert('VTableBeacon: No implementation found'); } /** * @dev Updates the vtable */ function updateVTable(ModuleDefinition[] calldata modules) external onlyOwner { for (uint256 i = 0; i < modules.length; ++i) { ModuleDefinition memory module = modules[i]; for (uint256 j = 0; j < module.selectors.length; ++j) { bytes4 selector = module.selectors[j]; emit VTableUpdate(selector, delegates[selector], module.implementation); delegates[selector] = module.implementation; } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"address","name":"oldImplementation","type":"address"},{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"VTableUpdate","type":"event"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"implementation","outputs":[{"internalType":"address","name":"module","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct VTableBeacon.ModuleDefinition[]","name":"modules","type":"tuple[]"}],"name":"updateVTable","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b6108138061007d6000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100bd578063a0a2daf0146100c5578063f2fde38b146100d857610072565b80630d74157714610077578063715018a6146100a0578063719c5ac2146100aa575b600080fd5b61008a6100853660046105fb565b6100eb565b6040516100979190610615565b60405180910390f35b6100a8610187565b005b6100a86100b836600461058c565b610252565b61008a6103ed565b61008a6100d33660046105fb565b6103fc565b6100a86100e636600461056b565b610417565b6001600160e01b031981166000908152600160205260409020546001600160a01b0316801561011957610182565b506001600160e01b031960005260016020527fec646dc6d4c93e86591cb8725f06e50158b413031b568ac64820b172699c5e86546001600160a01b0316801561016157610182565b60405162461bcd60e51b815260040161017990610643565b60405180910390fd5b919050565b61018f610538565b6001600160a01b03166101a06103ed565b6001600160a01b0316146101fb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b61025a610538565b6001600160a01b031661026b6103ed565b6001600160a01b0316146102c6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60005b818110156103e85760008383838181106102df57fe5b90506020028101906102f191906106a0565b6102fa906106e3565b905060005b8160200151518110156103de5760008260200151828151811061031e57fe5b6020908102919091018101516001600160e01b0319811660008181526001909352604092839020548651935192945090927ff76ead56fd55a04ec804a64583bc1e90671f895c8e71b18935917b92053ba87a92610385926001600160a01b03169190610629565b60405180910390a282516001600160e01b0319919091166000908152600160208190526040909120805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390931692909217909155016102ff565b50506001016102c9565b505050565b6000546001600160a01b031690565b6001602052600090815260409020546001600160a01b031681565b61041f610538565b6001600160a01b03166104306103ed565b6001600160a01b03161461048b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104d05760405162461bcd60e51b81526004018080602001828103825260268152602001806107b86026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3390565b80356001600160a01b038116811461018257600080fd5b80356001600160e01b03198116811461018257600080fd5b60006020828403121561057c578081fd5b6105858261053c565b9392505050565b6000806020838503121561059e578081fd5b823567ffffffffffffffff808211156105b5578283fd5b818501915085601f8301126105c8578283fd5b8135818111156105d6578384fd5b86602080830285010111156105e9578384fd5b60209290920196919550909350505050565b60006020828403121561060c578081fd5b61058582610553565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b60208082526025908201527f565461626c65426561636f6e3a204e6f20696d706c656d656e746174696f6e2060408201527f666f756e64000000000000000000000000000000000000000000000000000000606082015260800190565b60008235603e198336030181126106b5578182fd5b9190910192915050565b60405181810167ffffffffffffffff811182821017156106db57fe5b604052919050565b6000604082360312156106f4578081fd5b6040516040810167ffffffffffffffff828210818311171561071257fe5b8160405261071f8561053c565b8352602091508185013581811115610735578485fd5b850136601f820112610745578485fd5b80358281111561075157fe5b83810292506107618484016106bf565b81815284810190838601368686018801111561077b578889fd5b8895505b838610156107a45761079081610553565b83526001959095019491860191860161077f565b509486019490945250929594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220c0a6fd589630388eaad2e2ef48bbe69c911a7c90f8a5a99b822c90be8e79e43064736f6c63430007060033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100bd578063a0a2daf0146100c5578063f2fde38b146100d857610072565b80630d74157714610077578063715018a6146100a0578063719c5ac2146100aa575b600080fd5b61008a6100853660046105fb565b6100eb565b6040516100979190610615565b60405180910390f35b6100a8610187565b005b6100a86100b836600461058c565b610252565b61008a6103ed565b61008a6100d33660046105fb565b6103fc565b6100a86100e636600461056b565b610417565b6001600160e01b031981166000908152600160205260409020546001600160a01b0316801561011957610182565b506001600160e01b031960005260016020527fec646dc6d4c93e86591cb8725f06e50158b413031b568ac64820b172699c5e86546001600160a01b0316801561016157610182565b60405162461bcd60e51b815260040161017990610643565b60405180910390fd5b919050565b61018f610538565b6001600160a01b03166101a06103ed565b6001600160a01b0316146101fb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b61025a610538565b6001600160a01b031661026b6103ed565b6001600160a01b0316146102c6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60005b818110156103e85760008383838181106102df57fe5b90506020028101906102f191906106a0565b6102fa906106e3565b905060005b8160200151518110156103de5760008260200151828151811061031e57fe5b6020908102919091018101516001600160e01b0319811660008181526001909352604092839020548651935192945090927ff76ead56fd55a04ec804a64583bc1e90671f895c8e71b18935917b92053ba87a92610385926001600160a01b03169190610629565b60405180910390a282516001600160e01b0319919091166000908152600160208190526040909120805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390931692909217909155016102ff565b50506001016102c9565b505050565b6000546001600160a01b031690565b6001602052600090815260409020546001600160a01b031681565b61041f610538565b6001600160a01b03166104306103ed565b6001600160a01b03161461048b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104d05760405162461bcd60e51b81526004018080602001828103825260268152602001806107b86026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3390565b80356001600160a01b038116811461018257600080fd5b80356001600160e01b03198116811461018257600080fd5b60006020828403121561057c578081fd5b6105858261053c565b9392505050565b6000806020838503121561059e578081fd5b823567ffffffffffffffff808211156105b5578283fd5b818501915085601f8301126105c8578283fd5b8135818111156105d6578384fd5b86602080830285010111156105e9578384fd5b60209290920196919550909350505050565b60006020828403121561060c578081fd5b61058582610553565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b60208082526025908201527f565461626c65426561636f6e3a204e6f20696d706c656d656e746174696f6e2060408201527f666f756e64000000000000000000000000000000000000000000000000000000606082015260800190565b60008235603e198336030181126106b5578182fd5b9190910192915050565b60405181810167ffffffffffffffff811182821017156106db57fe5b604052919050565b6000604082360312156106f4578081fd5b6040516040810167ffffffffffffffff828210818311171561071257fe5b8160405261071f8561053c565b8352602091508185013581811115610735578485fd5b850136601f820112610745578485fd5b80358281111561075157fe5b83810292506107618484016106bf565b81815284810190838601368686018801111561077b578889fd5b8895505b838610156107a45761079081610553565b83526001959095019491860191860161077f565b509486019490945250929594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220c0a6fd589630388eaad2e2ef48bbe69c911a7c90f8a5a99b822c90be8e79e43064736f6c63430007060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.