ETH Price: $3,209.22 (-7.94%)
 

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Publish355989072025-09-16 1:46:0159 days ago1757987161IN
0x324Bd329...b795e1174
0 ETH0.000000110.00186518
Publish345980572025-08-23 21:44:2182 days ago1755985461IN
0x324Bd329...b795e1174
0 ETH0.000000060.00114468
Publish345980402025-08-23 21:43:4782 days ago1755985427IN
0x324Bd329...b795e1174
0 ETH0.000000060.00113287
Publish344330042025-08-20 2:02:3586 days ago1755655355IN
0x324Bd329...b795e1174
0 ETH0.000000570.00955719
Publish343898052025-08-19 2:02:3787 days ago1755568957IN
0x324Bd329...b795e1174
0 ETH0.000000160.00276526
Publish343440762025-08-18 0:38:1988 days ago1755477499IN
0x324Bd329...b795e1174
0 ETH0.000000080.00133604
Publish343148722025-08-17 8:24:5189 days ago1755419091IN
0x324Bd329...b795e1174
0 ETH0.000000070.00116137
Publish342573152025-08-16 0:26:1790 days ago1755303977IN
0x324Bd329...b795e1174
0 ETH0.000000080.00135106
Publish342169622025-08-15 2:01:1191 days ago1755223271IN
0x324Bd329...b795e1174
0 ETH0.00000010.00172717
Publish341810622025-08-14 6:04:3192 days ago1755151471IN
0x324Bd329...b795e1174
0 ETH0.00000060.00998955
Publish341651372025-08-13 21:13:4192 days ago1755119621IN
0x324Bd329...b795e1174
0 ETH0.000000510.00847793
Publish340858752025-08-12 1:11:3794 days ago1754961097IN
0x324Bd329...b795e1174
0 ETH0.000000420.00703161
Publish340514882025-08-11 6:05:2395 days ago1754892323IN
0x324Bd329...b795e1174
0 ETH0.000000140.00241964
Publish340322612025-08-10 19:24:2995 days ago1754853869IN
0x324Bd329...b795e1174
0 ETH0.000000160.00268146
Publish340322552025-08-10 19:24:1795 days ago1754853857IN
0x324Bd329...b795e1174
0 ETH0.000000160.00268614
Publish339151292025-08-08 2:20:0598 days ago1754619605IN
0x324Bd329...b795e1174
0 ETH0.000000360.00601541
Publish338708952025-08-07 1:45:3799 days ago1754531137IN
0x324Bd329...b795e1174
0 ETH0.000000350.0059206
Publish338301332025-08-06 3:06:53100 days ago1754449613IN
0x324Bd329...b795e1174
0 ETH0.000000220.00372383
Publish337821622025-08-05 0:27:51101 days ago1754353671IN
0x324Bd329...b795e1174
0 ETH0.000000320.00533717
Publish337418512025-08-04 2:04:09102 days ago1754273049IN
0x324Bd329...b795e1174
0 ETH0.000000330.00548635
Publish337418452025-08-04 2:03:57102 days ago1754273037IN
0x324Bd329...b795e1174
0 ETH0.000000330.00554417
Publish337418382025-08-04 2:03:43102 days ago1754273023IN
0x324Bd329...b795e1174
0 ETH0.000000330.00561467
Publish336211872025-08-01 7:02:01105 days ago1754031721IN
0x324Bd329...b795e1174
0 ETH0.000000360.00599502
Publish335739422025-07-31 4:47:11106 days ago1753937231IN
0x324Bd329...b795e1174
0 ETH0.00000070.01158209
Publish335223082025-07-30 0:06:03107 days ago1753833963IN
0x324Bd329...b795e1174
0 ETH0.000000240.00396074
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BaseL2GasIndex

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {ISilicaIndex} from "../interfaces/ISilicaIndex.sol";
import {ECDSA} from "@openzeppelin/utils/cryptography/ECDSA.sol";
import {AccessControl} from "@openzeppelin/access/AccessControl.sol";

/**
 * @title Silica Base L2 Gas Index
 * @author Alkimiya
 * @notice Methods to provide gas index data for Base
 */
contract BaseL2GasIndex is ISilicaIndex, AccessControl {
    /*//////////////////////////////////////////////////////////////
                                 STRUCTS
    //////////////////////////////////////////////////////////////*/

    struct Entry {
        uint128 delta;
        uint128 numBlocks;
    }

    /*//////////////////////////////////////////////////////////////
                                 ERRORS
    //////////////////////////////////////////////////////////////*/
    error NoDataForTick();
    error Publish_InvalidCalldata(string message);
    error EditTick_InvalidCalldata(string message); 

    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event NewTick(uint256 indexed tick, uint256 delta, uint256 numBlocks, uint256 balance);
    event EditTick(uint256 indexed tick, uint256 newDelta, uint256 newNumBlocks);
    event BalanceUpdated(uint256 indexed tick, uint256 oldBalance, uint256 newBalance);

    /*//////////////////////////////////////////////////////////////
                            STATE VARIABLES
    //////////////////////////////////////////////////////////////*/

    uint256 private constant SHARES = 1e8;
    uint128 private constant NUM_BLOCKS_PER_DAY = 43200;

    uint256 private _balance = 0;
    uint256 private _latestTick;
    mapping(uint256 => Entry) public entries;

    bytes32 private immutable _name;
    bytes32 private immutable _symbol;
    uint256 private immutable _decimals;
    address private immutable _balanceToken;

    bytes32 public constant PUBLISHER_ROLE = keccak256("PUBLISHER_ROLE");

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory name_,
        string memory symbol_,
        uint256 decimals_,
        address publisher_,
        address balanceToken_,
        uint256 initialBalance_,
        uint256 initialTick_
    ) {
        require(bytes(name_).length > 0, "Name cannot be empty");
        require(bytes(symbol_).length > 0, "Symbol cannot be empty");
        require(bytes(name_).length <= 32, "Name cannot exceed 32 bytes");
        require(bytes(symbol_).length <= 32, "Symbol cannot exceed 32 bytes");
        require(publisher_ != address(0), "Publisher cannot be zero address");
        require(balanceToken_ != address(0), "Balance Token cannot be zero address");

        _name = bytes32(bytes(name_));
        _symbol = bytes32(bytes(symbol_));
        _balance = initialBalance_;
        _decimals = decimals_;
        _balanceToken = balanceToken_;
        _latestTick = initialTick_;

        _grantRole(PUBLISHER_ROLE, publisher_);
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);

        emit NewTick(initialTick_, initialBalance_, NUM_BLOCKS_PER_DAY, initialBalance_);
        emit BalanceUpdated(initialTick_, 0, initialBalance_);
    }

    /*//////////////////////////////////////////////////////////////
                     ROLE MANAGEMENT FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /**
     * @dev Grants `role` to `account`.
     * @notice The caller must have ``role``'s admin role.
     * If `account` had not been already granted `role`, emits {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public override onlyRole(DEFAULT_ADMIN_ROLE) {
        _grantRole(role, account);
    }

    /*//////////////////////////////////////////////////////////////
                     WRITE FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /**
     * @notice Tracks the balance accumulated by the `shares()`.
     * @param _delta The change in balance
     */
    function publish(uint256 _delta) public onlyRole(PUBLISHER_ROLE) {
        require(_delta > 0, Publish_InvalidCalldata("_delta must be positive"));

        uint128 delta = uint128(_delta);

        // State changes
        uint256 oldBalance = _balance;
        _balance += delta;
        _latestTick += 1;
        entries[_latestTick] = Entry({delta: delta, numBlocks: NUM_BLOCKS_PER_DAY});

        // Events
        emit NewTick(_latestTick, delta, NUM_BLOCKS_PER_DAY, _balance);
        emit BalanceUpdated(_latestTick, oldBalance, _balance);
    }

    /**
     * @notice Edit an existing entry
     * @param _tick The day of the entry to edit
     * @param _newDelta The new delta value
     */
    function editTick(uint256 _tick, uint256 _newDelta) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(_tick <= _latestTick, EditTick_InvalidCalldata("Tick is greater than latest tick"));
        require(_newDelta > 0, EditTick_InvalidCalldata("_delta must be positive"));
        
        Entry storage entry = entries[_tick];
        uint128 oldDelta = entry.delta;
        uint256 oldBalance = _balance;

        uint128 newDelta = uint128(_newDelta);

        entries[_tick] = Entry({delta: newDelta, numBlocks: NUM_BLOCKS_PER_DAY});

        _balance = oldBalance - oldDelta + newDelta;

        emit EditTick(_tick, newDelta, NUM_BLOCKS_PER_DAY);
        emit BalanceUpdated(_tick, oldBalance, _balance);
    }

    /*//////////////////////////////////////////////////////////////
                         EXTERNAL VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    function getLatestTick() external view returns (uint256) {
        return _latestTick;
    }

    function getLatestTickData() external view returns (uint128, uint128) {
        return getTickData(_latestTick);
    }

    function getTickData(uint256 _tick) public view returns (uint128, uint128) {
        Entry memory entry = entries[_tick];
        if (entry.delta == 0 && entry.numBlocks == 0) {
            revert NoDataForTick();
        }
        return (entry.delta, entry.numBlocks);
    }

    function getTickDataInRange(uint256 from, uint256 to) external view returns (uint128[] memory, uint128[] memory) {
        require(from <= to, "Invalid range");
        require(to <= _latestTick, "Range exceeds latest tick");
        
        uint128[] memory deltas = new uint128[](to - from + 1);
        uint128[] memory numBlocks = new uint128[](to - from + 1);

        for (uint256 i = from; i <= to; i++) {
            Entry memory entry = entries[i];
            if (entry.delta == 0 && entry.numBlocks == 0) {
                revert NoDataForTick();
            }
            deltas[i - from] = entry.delta;
            numBlocks[i - from] = entry.numBlocks;
        }

        return (deltas, numBlocks);
    }

    /// @inheritdoc ISilicaIndex
    function name() external view returns (string memory) {
        return string(abi.encodePacked(_name));
    }

    /// @inheritdoc ISilicaIndex
    function symbol() external view returns (string memory) {
        return string(abi.encodePacked(_symbol));
    }

    /// @inheritdoc ISilicaIndex
    function decimals() external view returns (uint256) {
        return _decimals;
    }

    /// @inheritdoc ISilicaIndex
    function shares() external pure returns (uint256) {
        return SHARES;
    }

    /// @inheritdoc ISilicaIndex
    function balanceToken() external view returns (address) {
        return _balanceToken;
    }

    /// @inheritdoc ISilicaIndex
    function balance() external view returns (uint256) {
        return _balance;
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * _    _ _    _           _
 *     / \  | | | _(_)_ __ ___ (_)_   _  __ _
 *    / _ \ | | |/ / | '_ ` _ \| | | | |/ _` |
 *   / ___ \| |   <| | | | | | | | |_| | (_| |
 *  /_/_  \_\_|_|\_\_|_| |_| |_|_|\__, |\__,_|
 *  |_ _|_ __   __| | _____  __   |___/
 *   | || '_ \ / _` |/ _ \ \/ /
 *   | || | | | (_| |  __/>  <
 *  |___|_| |_|\__,_|\___/_/\_\
 */

/// @title Silica Index Protocol
/// @author Alkimiya
/// @notice Required methods for a contract to provide an index to Silica Pools
interface ISilicaIndex {
    /// @return A name suitable for display as a page title or heading.
    /// @custom:example "Bitcoin Mining Yield"
    /// @custom:example "Lido Staked Ethereum Yield"
    /// @custom:example "Gas Costs"
    /// @custom:since 0.1.0
    function name() external view returns (string memory);

    /// @return Short name of the display units of `shares()`.
    /// @custom:example "PH/s"
    /// @custom:example "ystETH"
    /// @custom:example "kgas"
    /// @custom:since 0.1.0
    function symbol() external view returns (string memory);

    /// @return Decimal offset of `symbol()` vs indivisible units of `shares()`.
    /// @custom:example If 1 `symbol()` (e.g. "PH/s") represents
    ///                 1e15 `shares()` (e.g. H/s)
    ///                 then `decimals()` should return 15.
    /// @custom:example If 1 `symbol()` (e.g. "ystETH") represents
    ///                 1e18 `shares()` (e.g. wei)
    ///                 then `decimals()` should return 18.
    /// @custom:example If 1 `symbol()` (e.g. "kgas") represents
    ///                 1e6 `shares()` (e.g. milligas per block)
    ///                 then `decimals()` should return 6.
    /// @custom:since 0.1.0
    function decimals() external view returns (uint256);

    /// @notice Size of the position tracked by this index.
    ///         Clients SHOULD NOT assume that this value is constant.
    ///         Clients SHOULD denominate pool shares in the same denomination
    ///         as `ISilicaIndex.shares()` (see: `symbol()`, `decimals()`).
    /// @custom:example 1e15 H/s.
    /// @custom:example `ILido.getPooledEthByShares(1 ether)` stETH wei.
    /// @custom:example 1e3 milligas per block
    /// @custom:since 0.1.0
    function shares() external view returns (uint256);

    /// @notice Clients MAY transact in any token which is pegged to
    ///         `balanceToken()`, as long as the `decimals()` match.
    ///         Clients SHOULD NOT transact in a token which is not pegged to
    ///         `balanceToken()`; the resulting financial contract will not
    ///         make sense.
    /// @custom:example 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599 (WBTC on mainnet)
    /// @custom:example 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84 (stETH on mainnet)
    /// @custom:example 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 (WETH on mainnet)
    /// @custom:since 0.1.0
    function balanceToken() external view returns (address);

    /// @return Tracks the balance accumulated by the `shares()`.
    /// @notice This is not required to increase over time.
    ///         Clients SHOULD have defensive programming against underflow
    ///         when taking `balance() - initialBalance`.
    /// @custom:example WBTC earned per PH/s since Jan 1, 2023.
    /// @custom:example `ILido.getPooledEthByShares(1 ether)` stETH.
    /// @custom:example Running cost to transact 1 gas every block since Jan 1, 2023.
    /// @custom:since 0.1.0
    function balance() external view returns (uint256);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.20;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS
    }

    /**
     * @dev The signature derives the `address(0)`.
     */
    error ECDSAInvalidSignature();

    /**
     * @dev The signature has an invalid length.
     */
    error ECDSAInvalidSignatureLength(uint256 length);

    /**
     * @dev The signature has an S value that is in the upper half order.
     */
    error ECDSAInvalidSignatureS(bytes32 s);

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
     * return address(0) without also returning an error description. Errors are documented using an enum (error type)
     * and a bytes32 providing additional information about the error.
     *
     * If no error is returned, then the address can be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function tryRecover(
        bytes32 hash,
        bytes memory signature
    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly ("memory-safe") {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
        unchecked {
            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
            // We do not check for an overflow here since the shift operation results in 0 or 1.
            uint8 v = uint8((uint256(vs) >> 255) + 27);
            return tryRecover(hash, v, r, s);
        }
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS, s);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature, bytes32(0));
        }

        return (signer, RecoverError.NoError, bytes32(0));
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
     */
    function _throwError(RecoverError error, bytes32 errorArg) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert ECDSAInvalidSignature();
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert ECDSAInvalidSignatureLength(uint256(errorArg));
        } else if (error == RecoverError.InvalidSignatureS) {
            revert ECDSAInvalidSignatureS(errorArg);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC-165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solady/=lib/solady/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint256","name":"decimals_","type":"uint256"},{"internalType":"address","name":"publisher_","type":"address"},{"internalType":"address","name":"balanceToken_","type":"address"},{"internalType":"uint256","name":"initialBalance_","type":"uint256"},{"internalType":"uint256","name":"initialTick_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"EditTick_InvalidCalldata","type":"error"},{"inputs":[],"name":"NoDataForTick","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"Publish_InvalidCalldata","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tick","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"BalanceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tick","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDelta","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newNumBlocks","type":"uint256"}],"name":"EditTick","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tick","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"delta","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numBlocks","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"NewTick","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLISHER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tick","type":"uint256"},{"internalType":"uint256","name":"_newDelta","type":"uint256"}],"name":"editTick","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"entries","outputs":[{"internalType":"uint128","name":"delta","type":"uint128"},{"internalType":"uint128","name":"numBlocks","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestTick","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestTickData","outputs":[{"internalType":"uint128","name":"","type":"uint128"},{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tick","type":"uint256"}],"name":"getTickData","outputs":[{"internalType":"uint128","name":"","type":"uint128"},{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"}],"name":"getTickDataInRange","outputs":[{"internalType":"uint128[]","name":"","type":"uint128[]"},{"internalType":"uint128[]","name":"","type":"uint128[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_delta","type":"uint256"}],"name":"publish","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

6101006040523461034a576112c68038038061001a8161034e565b92833981019060e08183031261034a5780516001600160401b03811161034a5782610046918301610387565b602082015190926001600160401b03821161034a57610066918301610387565b91604082015191610079606082016103d8565b93610086608083016103d8565b9460c060a084015193015195845115610305578251156102c057602085511161027b576020835111610236576001600160a01b038216156101f2576001600160a01b038116156101a1577ffa03b6304af61f28308225e213bf003207602328c0dad9495c9b2d61eec74f459561010c610122946101046040986103ec565b6080526103ec565b60a0528460015560c05260e0528560025561040e565b5061012c336104a6565b50837da992129c46757c6a42d27efa56255d28a511b09040a2ef55a0192656b10e6060845184815261a8c060208201528486820152a28151905f82526020820152a2604051610d4e908161051882396080518161077e015260a051816104a4015260c0518161056b015260e051816104260152f35b60405162461bcd60e51b8152602060048201526024808201527f42616c616e636520546f6b656e2063616e6e6f74206265207a65726f206164646044820152637265737360e01b6064820152608490fd5b606460405162461bcd60e51b815260206004820152602060248201527f5075626c69736865722063616e6e6f74206265207a65726f20616464726573736044820152fd5b60405162461bcd60e51b815260206004820152601d60248201527f53796d626f6c2063616e6e6f74206578636565642033322062797465730000006044820152606490fd5b60405162461bcd60e51b815260206004820152601b60248201527f4e616d652063616e6e6f742065786365656420333220627974657300000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601660248201527f53796d626f6c2063616e6e6f7420626520656d707479000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601460248201527f4e616d652063616e6e6f7420626520656d7074790000000000000000000000006044820152606490fd5b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761037357604052565b634e487b7160e01b5f52604160045260245ffd5b81601f8201121561034a578051906001600160401b038211610373576103b6601f8301601f191660200161034e565b928284526020838301011161034a57815f9260208093018386015e8301015290565b51906001600160a01b038216820361034a57565b602081519101519060208110610400575090565b5f199060200360031b1b1690565b6001600160a01b0381165f9081525f5160206112865f395f51905f52602052604090205460ff166104a1576001600160a01b03165f8181525f5160206112865f395f51905f5260205260408120805460ff191660011790553391907f0ac90c257048ef1c3e387c26d4a99bde06894efbcbff862dc1885c3a9319308a905f5160206112665f395f51905f529080a4600190565b505f90565b6001600160a01b0381165f9081525f5160206112a65f395f51905f52602052604090205460ff166104a1576001600160a01b03165f8181525f5160206112a65f395f51905f5260205260408120805460ff191660011790553391905f5160206112665f395f51905f528180a460019056fe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a7146109925750806303314efa14610974578063046677ad146107cc57806305182dc3146107b157806306fdde0314610766578063105ddcb3146105df578063248a9ca3146105ad5780632f2ff15d1461058e578063313ce5671461055457806336568abe1461051e57806391d14854146104e357806395d89b411461048c578063a08d0b3a1461046f578063a217fddf14610455578063a30955af14610411578063b30906d4146103bc578063b69ef8a81461039f578063cc4ef119146101e8578063d547741f14610180578063d8f4b6fd146101465763ff5cc8d214610103575f80fd5b346101425760203660031901126101425761011f600435610b65565b604080516001600160801b039384168152929091166020830152819081015b0390f35b5f80fd5b34610142575f3660031901126101425760206040517f0ac90c257048ef1c3e387c26d4a99bde06894efbcbff862dc1885c3a9319308a8152f35b346101425761018e36610a61565b6101a3825f525f602052600160405f20015490565b5f8181526020818152604080832033845290915290205490929060ff16156101d1576101cf9250610c98565b005b8263e2517d3f60e01b5f523360045260245260445ffd5b3461014257602036600319011261014257335f9081527f1d25d1bf9fe9bf50e1f6171a16c19ebe436b569b4a0755088949ca7700858eea60205260409020546004359060ff1615610368578015610328576001600160801b031660015461024f8282610a94565b60015560025460018101809111610314577ffa03b6304af61f28308225e213bf003207602328c0dad9495c9b2d61eec74f45918160409260025582519061029582610aa1565b858252602082019061a8c082525f5260036020526001600160801b03845f20925116906001600160801b0319905160801b1617905560025493847da992129c46757c6a42d27efa56255d28a511b09040a2ef55a0192656b10e606060015493865190815261a8c060208201528487820152a282519182526020820152a2005b634e487b7160e01b5f52601160045260245ffd5b60405163d4a7573360e01b81526020600482015260176024820152765f64656c7461206d75737420626520706f73697469766560481b6044820152606490fd5b63e2517d3f60e01b5f52336004527f0ac90c257048ef1c3e387c26d4a99bde06894efbcbff862dc1885c3a9319308a60245260445ffd5b34610142575f366003190112610142576020600154604051908152f35b34610142576020366003190112610142576004355f52600360205261013e60405f205460405191816001600160801b03849360801c9116839092916001600160801b0360209181604085019616845216910152565b34610142575f366003190112610142576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610142575f3660031901126101425760206040515f8152f35b34610142575f366003190112610142576020600254604051908152f35b34610142575f3660031901126101425761013e6040517f00000000000000000000000000000000000000000000000000000000000000006020820152602081526104d7604082610ad1565b60405191829182610a37565b34610142576104f136610a61565b905f525f60205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b346101425761052c36610a61565b336001600160a01b03821603610545576101cf91610c98565b63334bd91960e11b5f5260045ffd5b34610142575f3660031901126101425760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b34610142576101cf61059f36610a61565b906105a8610bc1565b610c10565b346101425760203660031901126101425760206105d76004355f525f602052600160405f20015490565b604051908152f35b34610142576105ed366109e5565b6105f5610bc1565b60025482116107215780156106e15760407ffa03b6304af61f28308225e213bf003207602328c0dad9495c9b2d61eec74f4591835f5260036020526106bc847fd9a9acb7f27ced2fb03fad8253403b8a91af1f11d31282b6d8c7bb9c2c66800b846106c16001600160801b03825f2054166001600160801b036001549716958691845161068181610aa1565b8381526020810161a8c08152885f5260036020526001600160801b03875f20925116906001600160801b0319905160801b1617905588610a87565b610a94565b9384600155815190815261a8c06020820152a282519182526020820152a2005b6040516349f6537360e11b81526020600482015260176024820152765f64656c7461206d75737420626520706f73697469766560481b6044820152606490fd5b60646040516349f6537360e11b815260206004820152602060248201527f5469636b2069732067726561746572207468616e206c6174657374207469636b6044820152fd5b34610142575f3660031901126101425761013e6040517f00000000000000000000000000000000000000000000000000000000000000006020820152602081526104d7604082610ad1565b34610142575f3660031901126101425761011f600254610b65565b34610142576107da366109e5565b80821161093f5760025481116108fa576107f48282610a87565b600181018091116103145761080890610b0b565b906108138382610a87565b600181018091116103145761082790610b0b565b92805b8281111561085c5761084e8461013e876040519384936040855260408501906109fb565b9083820360208501526109fb565b805f52600360205260405f206040519061087582610aa1565b546001600160801b0381169081835260801c60208301918183521590816108f1575b506108e2576001600160801b03809251166108bb6108b58686610a87565b88610b3d565b5251166108d16108cb8484610a87565b87610b3d565b525f1981146103145760010161082a565b63b474ed2960e01b5f5260045ffd5b90501588610897565b60405162461bcd60e51b815260206004820152601960248201527f52616e67652065786365656473206c6174657374207469636b000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b6044820152606490fd5b34610142575f3660031901126101425760206040516305f5e1008152f35b34610142576020366003190112610142576004359063ffffffff60e01b821680920361014257602091637965db0b60e01b81149081156109d4575b5015158152f35b6301ffc9a760e01b149050836109cd565b6040906003190112610142576004359060243590565b90602080835192838152019201905f5b818110610a185750505090565b82516001600160801b0316845260209384019390920191600101610a0b565b602060409281835280519182918282860152018484015e5f828201840152601f01601f1916010190565b604090600319011261014257600435906024356001600160a01b03811681036101425790565b9190820391821161031457565b9190820180921161031457565b6040810190811067ffffffffffffffff821117610abd57604052565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff821117610abd57604052565b67ffffffffffffffff8111610abd5760051b60200190565b90610b1582610af3565b610b226040519182610ad1565b8281528092610b33601f1991610af3565b0190602036910137565b8051821015610b515760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b5f52600360205260405f209060405191610b7e83610aa1565b54916001600160801b0383169283825260801c6020820193818552159081610bb8575b506108e2576001600160801b038091511692511690565b9050155f610ba1565b335f9081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1615610bf957565b63e2517d3f60e01b5f52336004525f60245260445ffd5b5f818152602081815260408083206001600160a01b038616845290915290205460ff16610c92575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b50505f90565b5f818152602081815260408083206001600160a01b038616845290915290205460ff1615610c92575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a460019056fea264697066735822122086203be3a36f2b335f24667c291a629a3f315cbf3aaf796c452e2e71ec04617e64736f6c634300081b00332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d1d25d1bf9fe9bf50e1f6171a16c19ebe436b569b4a0755088949ca7700858eeaad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb500000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000800000000000000000000000077cbf7cfd19e8697683271b733eca60b7c6aecfd00000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000036cb63558d398bdbe0000000000000000000000000000000000000000000000000000000000004e3c000000000000000000000000000000000000000000000000000000000000000e426173654c32476173496e6465780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005626c6f636b000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a7146109925750806303314efa14610974578063046677ad146107cc57806305182dc3146107b157806306fdde0314610766578063105ddcb3146105df578063248a9ca3146105ad5780632f2ff15d1461058e578063313ce5671461055457806336568abe1461051e57806391d14854146104e357806395d89b411461048c578063a08d0b3a1461046f578063a217fddf14610455578063a30955af14610411578063b30906d4146103bc578063b69ef8a81461039f578063cc4ef119146101e8578063d547741f14610180578063d8f4b6fd146101465763ff5cc8d214610103575f80fd5b346101425760203660031901126101425761011f600435610b65565b604080516001600160801b039384168152929091166020830152819081015b0390f35b5f80fd5b34610142575f3660031901126101425760206040517f0ac90c257048ef1c3e387c26d4a99bde06894efbcbff862dc1885c3a9319308a8152f35b346101425761018e36610a61565b6101a3825f525f602052600160405f20015490565b5f8181526020818152604080832033845290915290205490929060ff16156101d1576101cf9250610c98565b005b8263e2517d3f60e01b5f523360045260245260445ffd5b3461014257602036600319011261014257335f9081527f1d25d1bf9fe9bf50e1f6171a16c19ebe436b569b4a0755088949ca7700858eea60205260409020546004359060ff1615610368578015610328576001600160801b031660015461024f8282610a94565b60015560025460018101809111610314577ffa03b6304af61f28308225e213bf003207602328c0dad9495c9b2d61eec74f45918160409260025582519061029582610aa1565b858252602082019061a8c082525f5260036020526001600160801b03845f20925116906001600160801b0319905160801b1617905560025493847da992129c46757c6a42d27efa56255d28a511b09040a2ef55a0192656b10e606060015493865190815261a8c060208201528487820152a282519182526020820152a2005b634e487b7160e01b5f52601160045260245ffd5b60405163d4a7573360e01b81526020600482015260176024820152765f64656c7461206d75737420626520706f73697469766560481b6044820152606490fd5b63e2517d3f60e01b5f52336004527f0ac90c257048ef1c3e387c26d4a99bde06894efbcbff862dc1885c3a9319308a60245260445ffd5b34610142575f366003190112610142576020600154604051908152f35b34610142576020366003190112610142576004355f52600360205261013e60405f205460405191816001600160801b03849360801c9116839092916001600160801b0360209181604085019616845216910152565b34610142575f366003190112610142576040517f00000000000000000000000042000000000000000000000000000000000000066001600160a01b03168152602090f35b34610142575f3660031901126101425760206040515f8152f35b34610142575f366003190112610142576020600254604051908152f35b34610142575f3660031901126101425761013e6040517f626c6f636b0000000000000000000000000000000000000000000000000000006020820152602081526104d7604082610ad1565b60405191829182610a37565b34610142576104f136610a61565b905f525f60205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b346101425761052c36610a61565b336001600160a01b03821603610545576101cf91610c98565b63334bd91960e11b5f5260045ffd5b34610142575f3660031901126101425760206040517f00000000000000000000000000000000000000000000000000000000000000088152f35b34610142576101cf61059f36610a61565b906105a8610bc1565b610c10565b346101425760203660031901126101425760206105d76004355f525f602052600160405f20015490565b604051908152f35b34610142576105ed366109e5565b6105f5610bc1565b60025482116107215780156106e15760407ffa03b6304af61f28308225e213bf003207602328c0dad9495c9b2d61eec74f4591835f5260036020526106bc847fd9a9acb7f27ced2fb03fad8253403b8a91af1f11d31282b6d8c7bb9c2c66800b846106c16001600160801b03825f2054166001600160801b036001549716958691845161068181610aa1565b8381526020810161a8c08152885f5260036020526001600160801b03875f20925116906001600160801b0319905160801b1617905588610a87565b610a94565b9384600155815190815261a8c06020820152a282519182526020820152a2005b6040516349f6537360e11b81526020600482015260176024820152765f64656c7461206d75737420626520706f73697469766560481b6044820152606490fd5b60646040516349f6537360e11b815260206004820152602060248201527f5469636b2069732067726561746572207468616e206c6174657374207469636b6044820152fd5b34610142575f3660031901126101425761013e6040517f426173654c32476173496e6465780000000000000000000000000000000000006020820152602081526104d7604082610ad1565b34610142575f3660031901126101425761011f600254610b65565b34610142576107da366109e5565b80821161093f5760025481116108fa576107f48282610a87565b600181018091116103145761080890610b0b565b906108138382610a87565b600181018091116103145761082790610b0b565b92805b8281111561085c5761084e8461013e876040519384936040855260408501906109fb565b9083820360208501526109fb565b805f52600360205260405f206040519061087582610aa1565b546001600160801b0381169081835260801c60208301918183521590816108f1575b506108e2576001600160801b03809251166108bb6108b58686610a87565b88610b3d565b5251166108d16108cb8484610a87565b87610b3d565b525f1981146103145760010161082a565b63b474ed2960e01b5f5260045ffd5b90501588610897565b60405162461bcd60e51b815260206004820152601960248201527f52616e67652065786365656473206c6174657374207469636b000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642072616e676560981b6044820152606490fd5b34610142575f3660031901126101425760206040516305f5e1008152f35b34610142576020366003190112610142576004359063ffffffff60e01b821680920361014257602091637965db0b60e01b81149081156109d4575b5015158152f35b6301ffc9a760e01b149050836109cd565b6040906003190112610142576004359060243590565b90602080835192838152019201905f5b818110610a185750505090565b82516001600160801b0316845260209384019390920191600101610a0b565b602060409281835280519182918282860152018484015e5f828201840152601f01601f1916010190565b604090600319011261014257600435906024356001600160a01b03811681036101425790565b9190820391821161031457565b9190820180921161031457565b6040810190811067ffffffffffffffff821117610abd57604052565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff821117610abd57604052565b67ffffffffffffffff8111610abd5760051b60200190565b90610b1582610af3565b610b226040519182610ad1565b8281528092610b33601f1991610af3565b0190602036910137565b8051821015610b515760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b5f52600360205260405f209060405191610b7e83610aa1565b54916001600160801b0383169283825260801c6020820193818552159081610bb8575b506108e2576001600160801b038091511692511690565b9050155f610ba1565b335f9081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1615610bf957565b63e2517d3f60e01b5f52336004525f60245260445ffd5b5f818152602081815260408083206001600160a01b038616845290915290205460ff16610c92575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b50505f90565b5f818152602081815260408083206001600160a01b038616845290915290205460ff1615610c92575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a460019056fea264697066735822122086203be3a36f2b335f24667c291a629a3f315cbf3aaf796c452e2e71ec04617e64736f6c634300081b0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000800000000000000000000000077cbf7cfd19e8697683271b733eca60b7c6aecfd00000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000036cb63558d398bdbe0000000000000000000000000000000000000000000000000000000000004e3c000000000000000000000000000000000000000000000000000000000000000e426173654c32476173496e6465780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005626c6f636b000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): BaseL2GasIndex
Arg [1] : symbol_ (string): block
Arg [2] : decimals_ (uint256): 8
Arg [3] : publisher_ (address): 0x77CbF7CFD19e8697683271b733eCA60b7C6aeCFD
Arg [4] : balanceToken_ (address): 0x4200000000000000000000000000000000000006
Arg [5] : initialBalance_ (uint256): 63173739478609608126
Arg [6] : initialTick_ (uint256): 20028

-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [3] : 00000000000000000000000077cbf7cfd19e8697683271b733eca60b7c6aecfd
Arg [4] : 0000000000000000000000004200000000000000000000000000000000000006
Arg [5] : 0000000000000000000000000000000000000000000000036cb63558d398bdbe
Arg [6] : 0000000000000000000000000000000000000000000000000000000000004e3c
Arg [7] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [8] : 426173654c32476173496e646578000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [10] : 626c6f636b000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.