Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ChainStorageContainer
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /* Library Imports */ import { Lib_Buffer } from "../../libraries/utils/Lib_Buffer.sol"; import { Lib_AddressResolver } from "../../libraries/resolver/Lib_AddressResolver.sol"; /* Interface Imports */ import { IChainStorageContainer } from "./IChainStorageContainer.sol"; /** * @title ChainStorageContainer * @dev The Chain Storage Container provides its owner contract with read, write and delete * functionality. This provides gas efficiency gains by enabling it to overwrite storage slots which * can no longer be used in a fraud proof due to the fraud window having passed, and the associated * chain state or transactions being finalized. * Three distinct Chain Storage Containers will be deployed on Layer 1: * 1. Stores transaction batches for the Canonical Transaction Chain * 2. Stores queued transactions for the Canonical Transaction Chain * 3. Stores chain state batches for the State Commitment Chain * * Runtime target: EVM */ contract ChainStorageContainer is IChainStorageContainer, Lib_AddressResolver { /************* * Libraries * *************/ using Lib_Buffer for Lib_Buffer.Buffer; /************* * Variables * *************/ string public owner; Lib_Buffer.Buffer internal buffer; /*************** * Constructor * ***************/ /** * @param _libAddressManager Address of the Address Manager. * @param _owner Name of the contract that owns this container (will be resolved later). */ constructor(address _libAddressManager, string memory _owner) Lib_AddressResolver(_libAddressManager) { owner = _owner; } /********************** * Function Modifiers * **********************/ modifier onlyOwner() { require( msg.sender == resolve(owner), "ChainStorageContainer: Function can only be called by the owner." ); _; } /******************** * Public Functions * ********************/ /** * @inheritdoc IChainStorageContainer */ function setGlobalMetadata(bytes27 _globalMetadata) public onlyOwner { return buffer.setExtraData(_globalMetadata); } /** * @inheritdoc IChainStorageContainer */ function getGlobalMetadata() public view returns (bytes27) { return buffer.getExtraData(); } /** * @inheritdoc IChainStorageContainer */ function length() public view returns (uint256) { return uint256(buffer.getLength()); } /** * @inheritdoc IChainStorageContainer */ function push(bytes32 _object) public onlyOwner { buffer.push(_object); } /** * @inheritdoc IChainStorageContainer */ function push(bytes32 _object, bytes27 _globalMetadata) public onlyOwner { buffer.push(_object, _globalMetadata); } /** * @inheritdoc IChainStorageContainer */ function get(uint256 _index) public view returns (bytes32) { return buffer.get(uint40(_index)); } /** * @inheritdoc IChainStorageContainer */ function deleteElementsAfterInclusive(uint256 _index) public onlyOwner { buffer.deleteElementsAfterInclusive(uint40(_index)); } /** * @inheritdoc IChainStorageContainer */ function deleteElementsAfterInclusive(uint256 _index, bytes27 _globalMetadata) public onlyOwner { buffer.deleteElementsAfterInclusive(uint40(_index), _globalMetadata); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /** * @title Lib_Buffer * @dev This library implements a bytes32 storage array with some additional gas-optimized * functionality. In particular, it encodes its length as a uint40, and tightly packs this with an * overwritable "extra data" field so we can store more information with a single SSTORE. */ library Lib_Buffer { /************* * Libraries * *************/ using Lib_Buffer for Buffer; /*********** * Structs * ***********/ struct Buffer { bytes32 context; mapping(uint256 => bytes32) buf; } struct BufferContext { // Stores the length of the array. Uint40 is way more elements than we'll ever reasonably // need in an array and we get an extra 27 bytes of extra data to play with. uint40 length; // Arbitrary extra data that can be modified whenever the length is updated. Useful for // squeezing out some gas optimizations. bytes27 extraData; } /********************** * Internal Functions * **********************/ /** * Pushes a single element to the buffer. * @param _self Buffer to access. * @param _value Value to push to the buffer. * @param _extraData Global extra data. */ function push( Buffer storage _self, bytes32 _value, bytes27 _extraData ) internal { BufferContext memory ctx = _self.getContext(); _self.buf[ctx.length] = _value; // Bump the global index and insert our extra data, then save the context. ctx.length++; ctx.extraData = _extraData; _self.setContext(ctx); } /** * Pushes a single element to the buffer. * @param _self Buffer to access. * @param _value Value to push to the buffer. */ function push(Buffer storage _self, bytes32 _value) internal { BufferContext memory ctx = _self.getContext(); _self.push(_value, ctx.extraData); } /** * Retrieves an element from the buffer. * @param _self Buffer to access. * @param _index Element index to retrieve. * @return Value of the element at the given index. */ function get(Buffer storage _self, uint256 _index) internal view returns (bytes32) { BufferContext memory ctx = _self.getContext(); require(_index < ctx.length, "Index out of bounds."); return _self.buf[_index]; } /** * Deletes all elements after (and including) a given index. * @param _self Buffer to access. * @param _index Index of the element to delete from (inclusive). * @param _extraData Optional global extra data. */ function deleteElementsAfterInclusive( Buffer storage _self, uint40 _index, bytes27 _extraData ) internal { BufferContext memory ctx = _self.getContext(); require(_index < ctx.length, "Index out of bounds."); // Set our length and extra data, save the context. ctx.length = _index; ctx.extraData = _extraData; _self.setContext(ctx); } /** * Deletes all elements after (and including) a given index. * @param _self Buffer to access. * @param _index Index of the element to delete from (inclusive). */ function deleteElementsAfterInclusive(Buffer storage _self, uint40 _index) internal { BufferContext memory ctx = _self.getContext(); _self.deleteElementsAfterInclusive(_index, ctx.extraData); } /** * Retrieves the current global index. * @param _self Buffer to access. * @return Current global index. */ function getLength(Buffer storage _self) internal view returns (uint40) { BufferContext memory ctx = _self.getContext(); return ctx.length; } /** * Changes current global extra data. * @param _self Buffer to access. * @param _extraData New global extra data. */ function setExtraData(Buffer storage _self, bytes27 _extraData) internal { BufferContext memory ctx = _self.getContext(); ctx.extraData = _extraData; _self.setContext(ctx); } /** * Retrieves the current global extra data. * @param _self Buffer to access. * @return Current global extra data. */ function getExtraData(Buffer storage _self) internal view returns (bytes27) { BufferContext memory ctx = _self.getContext(); return ctx.extraData; } /** * Sets the current buffer context. * @param _self Buffer to access. * @param _ctx Current buffer context. */ function setContext(Buffer storage _self, BufferContext memory _ctx) internal { bytes32 context; uint40 length = _ctx.length; bytes27 extraData = _ctx.extraData; assembly { context := length context := or(context, extraData) } if (_self.context != context) { _self.context = context; } } /** * Retrieves the current buffer context. * @param _self Buffer to access. * @return Current buffer context. */ function getContext(Buffer storage _self) internal view returns (BufferContext memory) { bytes32 context = _self.context; uint40 length; bytes27 extraData; assembly { length := and( context, 0x000000000000000000000000000000000000000000000000000000FFFFFFFFFF ) extraData := and( context, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000 ) } return BufferContext({ length: length, extraData: extraData }); } }
// 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.5.0 <0.9.0; /** * @title IChainStorageContainer */ interface IChainStorageContainer { /******************** * Public Functions * ********************/ /** * Sets the container's global metadata field. We're using `bytes27` here because we use five * bytes to maintain the length of the underlying data structure, meaning we have an extra * 27 bytes to store arbitrary data. * @param _globalMetadata New global metadata to set. */ function setGlobalMetadata(bytes27 _globalMetadata) external; /** * Retrieves the container's global metadata field. * @return Container global metadata field. */ function getGlobalMetadata() external view returns (bytes27); /** * Retrieves the number of objects stored in the container. * @return Number of objects in the container. */ function length() external view returns (uint256); /** * Pushes an object into the container. * @param _object A 32 byte value to insert into the container. */ function push(bytes32 _object) external; /** * Pushes an object into the container. Function allows setting the global metadata since * we'll need to touch the "length" storage slot anyway, which also contains the global * metadata (it's an optimization). * @param _object A 32 byte value to insert into the container. * @param _globalMetadata New global metadata for the container. */ function push(bytes32 _object, bytes27 _globalMetadata) external; /** * Retrieves an object from the container. * @param _index Index of the particular object to access. * @return 32 byte object value. */ function get(uint256 _index) external view returns (bytes32); /** * Removes all objects after and including a given index. * @param _index Object index to delete from. */ function deleteElementsAfterInclusive(uint256 _index) external; /** * Removes all objects after and including a given index. Also allows setting the global * metadata field. * @param _index Object index to delete from. * @param _globalMetadata New global metadata for the container. */ function deleteElementsAfterInclusive(uint256 _index, bytes27 _globalMetadata) external; }
// 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": 10000 }, "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"},{"internalType":"string","name":"_owner","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"bytes27","name":"_globalMetadata","type":"bytes27"}],"name":"deleteElementsAfterInclusive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"deleteElementsAfterInclusive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"get","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGlobalMetadata","outputs":[{"internalType":"bytes27","name":"","type":"bytes27"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"length","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"libAddressManager","outputs":[{"internalType":"contract Lib_AddressManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_object","type":"bytes32"},{"internalType":"bytes27","name":"_globalMetadata","type":"bytes27"}],"name":"push","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_object","type":"bytes32"}],"name":"push","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"resolve","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes27","name":"_globalMetadata","type":"bytes27"}],"name":"setGlobalMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620011b3380380620011b3833981016040819052620000349162000129565b600080546001600160a01b0319166001600160a01b0384161790558051620000649060019060208401906200006d565b50505062000266565b8280546200007b9062000229565b90600052602060002090601f0160209004810192826200009f5760008555620000ea565b82601f10620000ba57805160ff1916838001178555620000ea565b82800160010185558215620000ea579182015b82811115620000ea578251825591602001919060010190620000cd565b50620000f8929150620000fc565b5090565b5b80821115620000f85760008155600101620000fd565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156200013d57600080fd5b82516001600160a01b03811681146200015557600080fd5b602084810151919350906001600160401b03808211156200017557600080fd5b818601915086601f8301126200018a57600080fd5b8151818111156200019f576200019f62000113565b604051601f8201601f19908116603f01168101908382118183101715620001ca57620001ca62000113565b816040528281528986848701011115620001e357600080fd5b600093505b82841015620002075784840186015181850187015292850192620001e8565b82841115620002195760008684830101525b8096505050505050509250929050565b600181811c908216806200023e57607f821691505b602082108114156200026057634e487b7160e01b600052602260045260246000fd5b50919050565b610f3d80620002766000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063461a4478116100815780639507d39a1161005b5780639507d39a146101a4578063b298e36b146101b7578063ccf8f969146101ca57600080fd5b8063461a4478146101695780634651d91e1461017c5780638da5cb5b1461018f57600080fd5b80632015276c116100b25780632015276c146100fe57806329061de214610111578063299ca4781461012457600080fd5b8063167fd681146100ce5780631f7b6d32146100e3575b600080fd5b6100e16100dc366004610c59565b6101e9565b005b6100eb61034d565b6040519081526020015b60405180910390f35b6100e161010c366004610c59565b610365565b6100e161011f366004610c85565b61043d565b6000546101449073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f5565b610144610177366004610cd6565b610517565b6100e161018a366004610da5565b6105c4565b61019761069b565b6040516100f59190610dbe565b6100eb6101b2366004610da5565b610729565b6100e16101c5366004610da5565b61073d565b6101d2610814565b60405164ffffffffff1990911681526020016100f5565b61027c600180546101f990610e31565b80601f016020809104026020016040519081016040528092919081815260200182805461022590610e31565b80156102725780601f1061024757610100808354040283529160200191610272565b820191906000526020600020905b81548152906001019060200180831161025557829003601f168201915b5050505050610517565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461033d57604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2060448201527f63616e206f6e6c792062652063616c6c656420627920746865206f776e65722e60648201526084015b60405180910390fd5b61034960028383610825565b5050565b6000610359600261090c565b64ffffffffff16905090565b610375600180546101f990610e31565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461043157604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2060448201527f63616e206f6e6c792062652063616c6c656420627920746865206f776e65722e6064820152608401610334565b61034960028383610957565b61044d600180546101f990610e31565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461050957604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2060448201527f63616e206f6e6c792062652063616c6c656420627920746865206f776e65722e6064820152608401610334565b6105146002826109e6565b50565b600080546040517fbf40fac100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063bf40fac19061056e908590600401610dbe565b60206040518083038186803b15801561058657600080fd5b505afa15801561059a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105be9190610e85565b92915050565b6105d4600180546101f990610e31565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461069057604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2060448201527f63616e206f6e6c792062652063616c6c656420627920746865206f776e65722e6064820152608401610334565b610514600282610a47565b600180546106a890610e31565b80601f01602080910402602001604051908101604052809291908181526020018280546106d490610e31565b80156107215780601f106106f657610100808354040283529160200191610721565b820191906000526020600020905b81548152906001019060200180831161070457829003601f168201915b505050505081565b60006105be600264ffffffffff8416610aa4565b61074d600180546101f990610e31565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461080957604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2060448201527f63616e206f6e6c792062652063616c6c656420627920746865206f776e65722e6064820152608401610334565b610514600282610b73565b60006108206002610bd0565b905090565b600061086784604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b9050806000015164ffffffffff168364ffffffffff16106108e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e646578206f7574206f6620626f756e64732e0000000000000000000000006044820152606401610334565b64ffffffffff8316815264ffffffffff19821660208201526109068482610c1e565b50505050565b60008061094f83604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b519392505050565b600061099984604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b805164ffffffffff16600090815260018601602052604090208490558051909150816109c482610ebb565b64ffffffffff1690525064ffffffffff19821660208201526109068482610c1e565b6000610a2883604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b64ffffffffff19831660208201529050610a428382610c1e565b505050565b6000610a8983604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b9050610a42828260200151856108259092919063ffffffff16565b600080610ae784604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b805190915064ffffffffff168310610b5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e646578206f7574206f6620626f756e64732e0000000000000000000000006044820152606401610334565b50506000908152600191909101602052604090205490565b6000610bb583604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b9050610a42828260200151856109579092919063ffffffff16565b600080610c1383604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b602001519392505050565b8051602082015183548183179291908314610c37578285555b5050505050565b803564ffffffffff1981168114610c5457600080fd5b919050565b60008060408385031215610c6c57600080fd5b82359150610c7c60208401610c3e565b90509250929050565b600060208284031215610c9757600080fd5b610ca082610c3e565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215610ce857600080fd5b813567ffffffffffffffff80821115610d0057600080fd5b818401915084601f830112610d1457600080fd5b813581811115610d2657610d26610ca7565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d6c57610d6c610ca7565b81604052828152876020848701011115610d8557600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208284031215610db757600080fd5b5035919050565b600060208083528351808285015260005b81811015610deb57858101830151858201604001528201610dcf565b81811115610dfd576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b600181811c90821680610e4557607f821691505b60208210811415610e7f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060208284031215610e9757600080fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610ca057600080fd5b600064ffffffffff80831681811415610efd577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600101939250505056fea264697066735822122008d3c580919ad7d42388bef81f9dfd29b521ea50250f4eb6e1cff3ebbec420cc64736f6c63430008090033000000000000000000000000de1fcfb0851916ca5101820a69b13a4e276bd81f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000145374617465436f6d6d69746d656e74436861696e000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063461a4478116100815780639507d39a1161005b5780639507d39a146101a4578063b298e36b146101b7578063ccf8f969146101ca57600080fd5b8063461a4478146101695780634651d91e1461017c5780638da5cb5b1461018f57600080fd5b80632015276c116100b25780632015276c146100fe57806329061de214610111578063299ca4781461012457600080fd5b8063167fd681146100ce5780631f7b6d32146100e3575b600080fd5b6100e16100dc366004610c59565b6101e9565b005b6100eb61034d565b6040519081526020015b60405180910390f35b6100e161010c366004610c59565b610365565b6100e161011f366004610c85565b61043d565b6000546101449073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f5565b610144610177366004610cd6565b610517565b6100e161018a366004610da5565b6105c4565b61019761069b565b6040516100f59190610dbe565b6100eb6101b2366004610da5565b610729565b6100e16101c5366004610da5565b61073d565b6101d2610814565b60405164ffffffffff1990911681526020016100f5565b61027c600180546101f990610e31565b80601f016020809104026020016040519081016040528092919081815260200182805461022590610e31565b80156102725780601f1061024757610100808354040283529160200191610272565b820191906000526020600020905b81548152906001019060200180831161025557829003601f168201915b5050505050610517565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461033d57604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2060448201527f63616e206f6e6c792062652063616c6c656420627920746865206f776e65722e60648201526084015b60405180910390fd5b61034960028383610825565b5050565b6000610359600261090c565b64ffffffffff16905090565b610375600180546101f990610e31565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461043157604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2060448201527f63616e206f6e6c792062652063616c6c656420627920746865206f776e65722e6064820152608401610334565b61034960028383610957565b61044d600180546101f990610e31565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461050957604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2060448201527f63616e206f6e6c792062652063616c6c656420627920746865206f776e65722e6064820152608401610334565b6105146002826109e6565b50565b600080546040517fbf40fac100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063bf40fac19061056e908590600401610dbe565b60206040518083038186803b15801561058657600080fd5b505afa15801561059a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105be9190610e85565b92915050565b6105d4600180546101f990610e31565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461069057604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2060448201527f63616e206f6e6c792062652063616c6c656420627920746865206f776e65722e6064820152608401610334565b610514600282610a47565b600180546106a890610e31565b80601f01602080910402602001604051908101604052809291908181526020018280546106d490610e31565b80156107215780601f106106f657610100808354040283529160200191610721565b820191906000526020600020905b81548152906001019060200180831161070457829003601f168201915b505050505081565b60006105be600264ffffffffff8416610aa4565b61074d600180546101f990610e31565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461080957604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f436861696e53746f72616765436f6e7461696e65723a2046756e6374696f6e2060448201527f63616e206f6e6c792062652063616c6c656420627920746865206f776e65722e6064820152608401610334565b610514600282610b73565b60006108206002610bd0565b905090565b600061086784604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b9050806000015164ffffffffff168364ffffffffff16106108e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e646578206f7574206f6620626f756e64732e0000000000000000000000006044820152606401610334565b64ffffffffff8316815264ffffffffff19821660208201526109068482610c1e565b50505050565b60008061094f83604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b519392505050565b600061099984604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b805164ffffffffff16600090815260018601602052604090208490558051909150816109c482610ebb565b64ffffffffff1690525064ffffffffff19821660208201526109068482610c1e565b6000610a2883604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b64ffffffffff19831660208201529050610a428382610c1e565b505050565b6000610a8983604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b9050610a42828260200151856108259092919063ffffffff16565b600080610ae784604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b805190915064ffffffffff168310610b5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f496e646578206f7574206f6620626f756e64732e0000000000000000000000006044820152606401610334565b50506000908152600191909101602052604090205490565b6000610bb583604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b9050610a42828260200151856109579092919063ffffffff16565b600080610c1383604080518082019091526000808252602082015250546040805180820190915264ffffffffff8216815264ffffffffff19909116602082015290565b602001519392505050565b8051602082015183548183179291908314610c37578285555b5050505050565b803564ffffffffff1981168114610c5457600080fd5b919050565b60008060408385031215610c6c57600080fd5b82359150610c7c60208401610c3e565b90509250929050565b600060208284031215610c9757600080fd5b610ca082610c3e565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215610ce857600080fd5b813567ffffffffffffffff80821115610d0057600080fd5b818401915084601f830112610d1457600080fd5b813581811115610d2657610d26610ca7565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610d6c57610d6c610ca7565b81604052828152876020848701011115610d8557600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208284031215610db757600080fd5b5035919050565b600060208083528351808285015260005b81811015610deb57858101830151858201604001528201610dcf565b81811115610dfd576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b600181811c90821680610e4557607f821691505b60208210811415610e7f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060208284031215610e9757600080fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610ca057600080fd5b600064ffffffffff80831681811415610efd577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600101939250505056fea264697066735822122008d3c580919ad7d42388bef81f9dfd29b521ea50250f4eb6e1cff3ebbec420cc64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000de1fcfb0851916ca5101820a69b13a4e276bd81f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000145374617465436f6d6d69746d656e74436861696e000000000000000000000000
-----Decoded View---------------
Arg [0] : _libAddressManager (address): 0xdE1FCfB0851916CA5101820A69b13a4E276bd81F
Arg [1] : _owner (string): StateCommitmentChain
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000de1fcfb0851916ca5101820a69b13a4e276bd81f
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [3] : 5374617465436f6d6d69746d656e74436861696e000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 29 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.