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
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 17577610 | 437 days ago | IN | 0 ETH | 0.00639593 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BondManager
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /* Interface Imports */ import { IBondManager } from "./IBondManager.sol"; /* Contract Imports */ import { Lib_AddressResolver } from "../../libraries/resolver/Lib_AddressResolver.sol"; /** * @title BondManager * @dev This contract is, for now, a stub of the "real" BondManager that does nothing but * allow the "BVM_Proposer" to submit state root batches. * */ contract BondManager is IBondManager, Lib_AddressResolver { /** * @param _libAddressManager Address of the Address Manager. */ constructor(address _libAddressManager) Lib_AddressResolver(_libAddressManager) {} /** * Checks whether a given address is properly collateralized and can perform actions within * the system. * @param _who Address to check. * @return true if the address is properly collateralized, false otherwise. */ // slither-disable-next-line external-function function isCollateralized(address _who) public view returns (bool) { // Only authenticate sequencer to submit state root batches. return _who == resolve("BVM_Proposer"); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /* Library Imports */ import { Lib_AddressManager } from "./Lib_AddressManager.sol"; /** * @title Lib_AddressResolver */ abstract contract Lib_AddressResolver { /************* * Variables * *************/ Lib_AddressManager public libAddressManager; /*************** * Constructor * ***************/ /** * @param _libAddressManager Address of the Lib_AddressManager. */ constructor(address _libAddressManager) { libAddressManager = Lib_AddressManager(_libAddressManager); } /******************** * Public Functions * ********************/ /** * Resolves the address associated with a given name. * @param _name Name to resolve an address for. * @return Address associated with the given name. */ function resolve(string memory _name) public view returns (address) { return libAddressManager.getAddress(_name); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /** * @title IBondManager */ interface IBondManager { /******************** * Public Functions * ********************/ function isCollateralized(address _who) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /* External Imports */ import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; /** * @title Lib_AddressManager */ contract Lib_AddressManager is Ownable { /********** * Events * **********/ event AddressSet(string indexed _name, address _newAddress, address _oldAddress); /************* * Variables * *************/ mapping(bytes32 => address) private addresses; /******************** * Public Functions * ********************/ /** * Changes the address associated with a particular name. * @param _name String name to associate an address with. * @param _address Address to associate with the name. */ function setAddress(string memory _name, address _address) external onlyOwner { bytes32 nameHash = _getNameHash(_name); address oldAddress = addresses[nameHash]; addresses[nameHash] = _address; emit AddressSet(_name, _address, oldAddress); } /** * Retrieves the address associated with a given name. * @param _name Name to retrieve an address for. * @return Address associated with the given name. */ function getAddress(string memory _name) external view returns (address) { return addresses[_getNameHash(_name)]; } /********************** * Internal Functions * **********************/ /** * Computes the hash of a name. * @param _name Name to compute a hash for. * @return Hash of the given name. */ function _getNameHash(string memory _name) internal pure returns (bytes32) { return keccak256(abi.encodePacked(_name)); } }
// SPDX-License-Identifier: MIT pragma solidity ^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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^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 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) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_libAddressManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_who","type":"address"}],"name":"isCollateralized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"libAddressManager","outputs":[{"internalType":"contract Lib_AddressManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"resolve","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516103bb3803806103bb83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b610328806100936000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806302ad4d2a14610046578063299ca4781461006e578063461a447814610099575b600080fd5b610059610054366004610195565b6100ac565b60405190151581526020015b60405180910390f35b600054610081906001600160a01b031681565b6040516001600160a01b039091168152602001610065565b6100816100a73660046101cf565b6100f6565b60006100db6040518060400160405280600c81526020016b212b26afa83937b837b9b2b960a11b8152506100f6565b6001600160a01b0316826001600160a01b0316149050919050565b6000805460405163bf40fac160e01b81526001600160a01b039091169063bf40fac190610127908590600401610280565b60206040518083038186803b15801561013f57600080fd5b505afa158015610153573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017791906102d5565b92915050565b6001600160a01b038116811461019257600080fd5b50565b6000602082840312156101a757600080fd5b81356101b28161017d565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156101e157600080fd5b813567ffffffffffffffff808211156101f957600080fd5b818401915084601f83011261020d57600080fd5b81358181111561021f5761021f6101b9565b604051601f8201601f19908116603f01168101908382118183101715610247576102476101b9565b8160405282815287602084870101111561026057600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b818110156102ad57858101830151858201604001528201610291565b818111156102bf576000604083870101525b50601f01601f1916929092016040019392505050565b6000602082840312156102e757600080fd5b81516101b28161017d56fea264697066735822122001b0fcd2fe35ea1c8769d40c0a1fbdfe16bff1d476980df598e6a0ccdf55e89564736f6c634300080900330000000000000000000000006968f3f16c3e64003f02e121cf0d5ccbf5625a42
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c806302ad4d2a14610046578063299ca4781461006e578063461a447814610099575b600080fd5b610059610054366004610195565b6100ac565b60405190151581526020015b60405180910390f35b600054610081906001600160a01b031681565b6040516001600160a01b039091168152602001610065565b6100816100a73660046101cf565b6100f6565b60006100db6040518060400160405280600c81526020016b212b26afa83937b837b9b2b960a11b8152506100f6565b6001600160a01b0316826001600160a01b0316149050919050565b6000805460405163bf40fac160e01b81526001600160a01b039091169063bf40fac190610127908590600401610280565b60206040518083038186803b15801561013f57600080fd5b505afa158015610153573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017791906102d5565b92915050565b6001600160a01b038116811461019257600080fd5b50565b6000602082840312156101a757600080fd5b81356101b28161017d565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156101e157600080fd5b813567ffffffffffffffff808211156101f957600080fd5b818401915084601f83011261020d57600080fd5b81358181111561021f5761021f6101b9565b604051601f8201601f19908116603f01168101908382118183101715610247576102476101b9565b8160405282815287602084870101111561026057600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b818110156102ad57858101830151858201604001528201610291565b818111156102bf576000604083870101525b50601f01601f1916929092016040019392505050565b6000602082840312156102e757600080fd5b81516101b28161017d56fea264697066735822122001b0fcd2fe35ea1c8769d40c0a1fbdfe16bff1d476980df598e6a0ccdf55e89564736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006968f3f16c3e64003f02e121cf0d5ccbf5625a42
-----Decoded View---------------
Arg [0] : _libAddressManager (address): 0x6968f3F16C3e64003F02E121cf0D5CCBf5625a42
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000006968f3f16c3e64003f02e121cf0d5ccbf5625a42
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 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.