ETH Price: $2,707.72 (-1.31%)

Contract

0x9488795C688d0AAe98F2056467C13a051C954657

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SeriesNonceManager

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
shanghai EvmVersion
// SPDX-License-Identifier: MIT

pragma solidity 0.8.23;

/// @title A helper contract to manage nonce with the series
contract SeriesNonceManager {
    error AdvanceNonceFailed();
    event NonceIncreased(address indexed maker, uint256 series, uint256 newNonce);

    // {
    //    1: {
    //        '0x762f73Ad...842Ffa8': 0,
    //        '0xd20c41ee...32aaDe2': 1
    //    },
    //    2: {
    //        '0x762f73Ad...842Ffa8': 3,
    //        '0xd20c41ee...32aaDe2': 15
    //    },
    //    ...
    // }
    mapping(uint256 series => mapping(address maker => uint256 nonce)) public nonce;

    /// @notice Advances nonce by one
    function increaseNonce(uint8 series) external {
        advanceNonce(series, 1);
    }

    /// @notice Advances nonce by specified amount
    function advanceNonce(uint256 series, uint256 amount) public {
        if (amount == 0 || amount > 255) revert AdvanceNonceFailed();
        unchecked {
            uint256 newNonce = nonce[series][msg.sender] + amount;
            nonce[series][msg.sender] = newNonce;
            emit NonceIncreased(msg.sender, series, newNonce);
        }
    }

    /// @notice Checks if `makerAddress` has specified `makerNonce` for `series`
    /// @return Result True if `makerAddress` has specified nonce. Otherwise, false
    function nonceEquals(uint256 series, address makerAddress, uint256 makerNonce) public view returns(bool) {
        return nonce[series][makerAddress] == makerNonce;
    }

    /// @notice Checks passed time against block timestamp
    /// @return Result True if current block timestamp is lower than `time`. Otherwise, false
    function timestampBelow(uint256 time) public view returns(bool) {
        return block.timestamp < time;  // solhint-disable-line not-rely-on-time
    }

    function timestampBelowAndNonceEquals(uint256 timeNonceSeriesAccount) public view returns(bool) {
        uint256 _time = uint40(timeNonceSeriesAccount >> 216);
        uint256 _nonce = uint40(timeNonceSeriesAccount >> 176);
        uint256 _series = uint16(timeNonceSeriesAccount >> 160);
        address _account = address(uint160(timeNonceSeriesAccount));
        return timestampBelow(_time) && nonceEquals(_series, _account, _nonce);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "evmVersion": "shanghai",
  "viaIR": true,
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"AdvanceNonceFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":false,"internalType":"uint256","name":"series","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newNonce","type":"uint256"}],"name":"NonceIncreased","type":"event"},{"inputs":[{"internalType":"uint256","name":"series","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"advanceNonce","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"series","type":"uint8"}],"name":"increaseNonce","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"series","type":"uint256"},{"internalType":"address","name":"maker","type":"address"}],"name":"nonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"series","type":"uint256"},{"internalType":"address","name":"makerAddress","type":"address"},{"internalType":"uint256","name":"makerNonce","type":"uint256"}],"name":"nonceEquals","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"timestampBelow","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timeNonceSeriesAccount","type":"uint256"}],"name":"timestampBelowAndNonceEquals","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60808060405234610016576103db908161001b8239f35b5f80fdfe60406080815260049081361015610014575f80fd5b5f3560e01c80632cc2878d146102ec5780634a7f2a4b146102825780635d3a09dc146101b157806363592c2b146101745780637a37dc2c146100dc5763976222211461005e575f80fd5b346100d85760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d8576100cf60209261009b610382565b60443591355f525f60205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f5260205260405f20541490565b90519015158152f35b5f80fd5b5090346100d857602090817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d857359160ff83168093036100d8577fdc0537f71d06d3708f52baf4ddf6918b25f1a145ba08873de27485682b35cac191835f525f8152815f20335f5281526001825f20540190845f525f8152825f20335f52815281835f205582519485528401523392a2005b5090346100d85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d85760209151903542108152f35b50346100d857807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d8578135916024359081158015610278575b6102515750907fdc0537f71d06d3708f52baf4ddf6918b25f1a145ba08873de27485682b35cac191835f525f602052815f20335f52602052815f205401835f525f602052815f20335f5260205280825f2055815193845260208401523392a2005b82517fbd71636d000000000000000000000000000000000000000000000000000000008152fd5b5060ff82116101f0565b50346100d857807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d8576020916102bc610382565b90355f525f835273ffffffffffffffffffffffffffffffffffffffff825f2091165f528252805f20549051908152f35b50346100d85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d85760209135908160d81c42109182610337575b50519015158152f35b60a081901c61ffff165f9081526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205491925060b01c64ffffffffff1614905f61032e565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100d85756fea26469706673582212204c14367cb163d12c34d8a8b4fcc86e87632b340970792323fedfb566dd353e8d64736f6c63430008170033

Deployed Bytecode

0x60406080815260049081361015610014575f80fd5b5f3560e01c80632cc2878d146102ec5780634a7f2a4b146102825780635d3a09dc146101b157806363592c2b146101745780637a37dc2c146100dc5763976222211461005e575f80fd5b346100d85760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d8576100cf60209261009b610382565b60443591355f525f60205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f5260205260405f20541490565b90519015158152f35b5f80fd5b5090346100d857602090817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d857359160ff83168093036100d8577fdc0537f71d06d3708f52baf4ddf6918b25f1a145ba08873de27485682b35cac191835f525f8152815f20335f5281526001825f20540190845f525f8152825f20335f52815281835f205582519485528401523392a2005b5090346100d85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d85760209151903542108152f35b50346100d857807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d8578135916024359081158015610278575b6102515750907fdc0537f71d06d3708f52baf4ddf6918b25f1a145ba08873de27485682b35cac191835f525f602052815f20335f52602052815f205401835f525f602052815f20335f5260205280825f2055815193845260208401523392a2005b82517fbd71636d000000000000000000000000000000000000000000000000000000008152fd5b5060ff82116101f0565b50346100d857807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d8576020916102bc610382565b90355f525f835273ffffffffffffffffffffffffffffffffffffffff825f2091165f528252805f20549051908152f35b50346100d85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100d85760209135908160d81c42109182610337575b50519015158152f35b60a081901c61ffff165f9081526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205491925060b01c64ffffffffff1614905f61032e565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100d85756fea26469706673582212204c14367cb163d12c34d8a8b4fcc86e87632b340970792323fedfb566dd353e8d64736f6c63430008170033

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

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.