Bokuto Testnet

Contract

0x6E81E127a280Cd17BeBc7704Ce28a0226295A12b
Source Code Source Code

Overview

ETH Balance

0 ETH

More Info

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Amount

There are no matching entries

Please try again later

Parent Transaction Hash Block From To Amount
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OracleDelegate

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT

pragma solidity 0.8.18;

/**
 * Math operations with safety checks
 */

import "../components/Owned.sol";
import "./OracleStorage.sol";

/**
 * @title OracleDelegate
 * @dev Implementation contract for Oracle functionality
 * This contract provides:
 * - Price data management
 * - Storeman group configuration management
 * - Admin role management
 * - Debt status tracking
 */
contract OracleDelegate is OracleStorage, Owned {
  /**
   * @notice Emitted when admin address is changed
   * @param addr New admin address
    */
  event SetAdmin(address addr);
  
  /**
   * @notice Emitted when prices are updated
   * @param keys Array of price keys
   * @param prices Array of new prices
   */
  event UpdatePrice(bytes32[] keys, uint[] prices);
  
  /**
   * @notice Emitted when debt clean status is updated
   * @param id Storeman group ID
   * @param isDebtClean New debt clean status
   */
  event SetDebtClean(bytes32 indexed id, bool isDebtClean);
  
  /**
   * @notice Emitted when storeman group configuration is set
   * @param id Storeman group ID
   * @param status New status
   * @param deposit New deposit amount
   * @param chain Array of chain IDs
   * @param curve Array of curve parameters
   * @param gpk1 First group public key
   * @param gpk2 Second group public key
   * @param startTime New start time
   * @param endTime New end time
   */
  event SetStoremanGroupConfig(bytes32 indexed id, uint8 status, uint deposit, uint[2] chain, uint[2] curve, bytes gpk1, bytes gpk2, uint startTime, uint endTime);
  
  /**
   * @notice Emitted when storeman group status is updated
   * @param id Storeman group ID
   * @param status New status
   */
  event SetStoremanGroupStatus(bytes32 indexed id, uint8 status);
  
  /**
   * @notice Emitted when deposit amount is updated
   * @param id Storeman group ID
   * @param deposit New deposit amount
   */
  event UpdateDeposit(bytes32 indexed id, uint deposit);

  /**
   * @notice Modifier to restrict function access to admin only
   * @dev Throws if called by any account other than admin or owner
    */
  modifier onlyAdmin() {
      require((msg.sender == admin) || (msg.sender == owner), "not admin");
      _;
  }

  /**
   * @notice Updates multiple token prices
   * @dev Can only be called by admin
   * @param keys Array of price keys
   * @param prices Array of new prices
   * Requirements:
   * - Arrays must have the same length
   * - Caller must be admin
   * Emits:
   * - UpdatePrice event with keys and prices
   */
  function updatePrice(
    bytes32[] calldata keys,
    uint[] calldata prices
  )
    external
    onlyAdmin
  {
    require(keys.length == prices.length, "length not same");

    for (uint256 i = 0; i < keys.length; i++) {
      mapPrices[keys[i]] = prices[i];
    }

    emit UpdatePrice(keys, prices);
  }

  /**
   * @notice Updates deposit amount for a storeman group
   * @dev Can only be called by admin
   * @param smgID Storeman group ID
   * @param amount New deposit amount
   * Requirements:
   * - Caller must be admin
   * Emits:
   * - UpdateDeposit event with group ID and new amount
   */
  function updateDeposit(
    bytes32 smgID,
    uint amount
  )
    external
    onlyAdmin
  {
    mapStoremanGroupConfig[smgID].deposit = amount;

    emit UpdateDeposit(smgID, amount);
  }

  /**
   * @notice Sets status for a storeman group
   * @dev Can only be called by admin
   * @param id Storeman group ID
   * @param status New status
   * Requirements:
   * - Caller must be admin
   * Emits:
   * - SetStoremanGroupStatus event with group ID and new status
   */
  function setStoremanGroupStatus(
    bytes32 id,
    uint8  status
  )
    external
    onlyAdmin
  {
    mapStoremanGroupConfig[id].status = status;

    emit SetStoremanGroupStatus(id, status);
  }

  /**
   * @notice Sets complete configuration for a storeman group
   * @dev Can only be called by admin
   * @param id Storeman group ID
   * @param status New status
   * @param deposit New deposit amount
   * @param chain Array of chain IDs
   * @param curve Array of curve parameters
   * @param gpk1 First group public key
   * @param gpk2 Second group public key
   * @param startTime New start time
   * @param endTime New end time
   * Requirements:
   * - Caller must be admin
   * Emits:
   * - SetStoremanGroupConfig event with all parameters
   */
  function setStoremanGroupConfig(
    bytes32 id,
    uint8   status,
    uint    deposit,
    uint[2] calldata chain,
    uint[2] calldata curve,
    bytes   calldata gpk1,
    bytes   calldata gpk2,
    uint    startTime,
    uint    endTime
  )
    external
    onlyAdmin
  {
    mapStoremanGroupConfig[id].deposit = deposit;
    mapStoremanGroupConfig[id].status = status;
    mapStoremanGroupConfig[id].chain[0] = chain[0];
    mapStoremanGroupConfig[id].chain[1] = chain[1];
    mapStoremanGroupConfig[id].curve[0] = curve[0];
    mapStoremanGroupConfig[id].curve[1] = curve[1];
    mapStoremanGroupConfig[id].gpk1 = gpk1;
    mapStoremanGroupConfig[id].gpk2 = gpk2;
    mapStoremanGroupConfig[id].startTime = startTime;
    mapStoremanGroupConfig[id].endTime = endTime;

    emit SetStoremanGroupConfig(id, status, deposit, chain, curve, gpk1, gpk2, startTime, endTime);
  }

  /**
   * @notice Sets debt clean status for a storeman group
   * @dev Can only be called by admin
   * @param storemanGroupId Storeman group ID
   * @param isClean New debt clean status
   * Requirements:
   * - Caller must be admin
   * Emits:
   * - SetDebtClean event with group ID and new status
   */
  function setDebtClean(
    bytes32 storemanGroupId,
    bool isClean
  )
    external
    onlyAdmin
  {
    mapStoremanGroupConfig[storemanGroupId].isDebtClean = isClean;

    emit SetDebtClean(storemanGroupId, isClean);
  }

  /**
   * @notice Sets the admin address
   * @dev Can only be called by owner
   * @param addr New admin address
   * Requirements:
   * - Caller must be owner
   * Emits:
   * - SetAdmin event with new admin address
   */
  function setAdmin(
    address addr
  ) external onlyOwner
  {
    admin = addr;

    emit SetAdmin(addr);
  }

  /**
   * @notice Gets price for a specific key
   * @param key Price key
   * @return Current price value
   */
  function getValue(bytes32 key) external view returns (uint) {
    return mapPrices[key];
  }

  /**
   * @notice Gets prices for multiple keys
   * @param keys Array of price keys
   * @return values Array of current prices
   */
  function getValues(bytes32[] calldata keys) external view returns (uint[] memory values) {
    values = new uint[](keys.length);
    for(uint256 i = 0; i < keys.length; i++) {
        values[i] = mapPrices[keys[i]];
    }
  }

  /**
   * @notice Gets deposit amount for a storeman group
   * @param smgID Storeman group ID
   * @return Current deposit amount
   */
  function getDeposit(bytes32 smgID) external view returns (uint) {
    return mapStoremanGroupConfig[smgID].deposit;
  }

  /**
   * @notice Gets complete configuration for a storeman group
   * @param id Storeman group ID
   * @return groupId Group ID
   * @return status Current status
   * @return deposit Current deposit amount
   * @return chain1 First chain ID
   * @return chain2 Second chain ID
   * @return curve1 First curve parameter
   * @return curve2 Second curve parameter
   * @return gpk1 First group public key
   * @return gpk2 Second group public key
   * @return startTime Start time
   * @return endTime End time
   */
  function getStoremanGroupConfig(
    bytes32 id
  )
    external
    view
    returns(bytes32 groupId, uint8 status, uint deposit, uint chain1, uint chain2, uint curve1, uint curve2, bytes memory gpk1, bytes memory gpk2, uint startTime, uint endTime)
  {
    groupId = id;
    status = mapStoremanGroupConfig[id].status;
    deposit = mapStoremanGroupConfig[id].deposit;
    chain1 = mapStoremanGroupConfig[id].chain[0];
    chain2 = mapStoremanGroupConfig[id].chain[1];
    curve1 = mapStoremanGroupConfig[id].curve[0];
    curve2 = mapStoremanGroupConfig[id].curve[1];
    gpk1 = mapStoremanGroupConfig[id].gpk1;
    gpk2 = mapStoremanGroupConfig[id].gpk2;
    startTime = mapStoremanGroupConfig[id].startTime;
    endTime = mapStoremanGroupConfig[id].endTime;
  }

  /**
   * @notice Gets status information for a storeman group
   * @param id Storeman group ID
   * @return status Current status
   * @return startTime Start time
   * @return endTime End time
   */
  function getStoremanGroupStatus(bytes32 id)
    public
    view
    returns(uint8 status, uint startTime, uint endTime)
  {
    status = mapStoremanGroupConfig[id].status;
    startTime = mapStoremanGroupConfig[id].startTime;
    endTime = mapStoremanGroupConfig[id].endTime;
  }

  /**
   * @notice Checks if a storeman group's debts are clean
   * @param storemanGroupId Storeman group ID
   * @return Whether debts are clean
   */
  function isDebtClean(
    bytes32 storemanGroupId
  )
    external
    view
    returns (bool)
  {
    return mapStoremanGroupConfig[storemanGroupId].isDebtClean;
  }
}

File 2 of 5 : BasicStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.18;

import "../lib/BasicStorageLib.sol";

/**
 * @title BasicStorage
 * @dev Base contract for managing different types of storage data
 * This contract provides basic storage functionality for various data types
 * using the BasicStorageLib library
 * 
 * Key features:
 * - Multiple data type storage support
 * - Library-based storage management
 * - Internal storage access
 * 
 * @custom:usage
 * - Used as base contract for storage functionality
 * - Provides structured storage for different data types
 * - Supports inheritance for storage management
 */
contract BasicStorage {
    /************************************************************
     **
     ** VARIABLES
     **
     ************************************************************/

    //// basic variables
    /**
     * @dev Library usage declarations for different data types
     * 
     * @custom:usage
     * - UintData: For unsigned integer storage
     * - BoolData: For boolean storage
     * - AddressData: For address storage
     * - BytesData: For bytes storage
     * - StringData: For string storage
     */
    using BasicStorageLib for BasicStorageLib.UintData;
    using BasicStorageLib for BasicStorageLib.BoolData;
    using BasicStorageLib for BasicStorageLib.AddressData;
    using BasicStorageLib for BasicStorageLib.BytesData;
    using BasicStorageLib for BasicStorageLib.StringData;

    /**
     * @dev Internal storage variables for different data types
     * 
     * @custom:usage
     * - uintData: Stores unsigned integers
     * - boolData: Stores boolean values
     * - addressData: Stores addresses
     * - bytesData: Stores bytes data
     * - stringData: Stores strings
     * 
     * @custom:security
     * - Internal visibility for controlled access
     * - Library-based storage management
     */
    BasicStorageLib.UintData    internal uintData;
    BasicStorageLib.BoolData    internal boolData;
    BasicStorageLib.AddressData internal addressData;
    BasicStorageLib.BytesData   internal bytesData;
    BasicStorageLib.StringData  internal stringData;
}

// SPDX-License-Identifier: MIT

/*

  Copyright 2023 Wanchain Foundation.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

//                            _           _           _
//  __      ____ _ _ __   ___| |__   __ _(_)_ __   __| | _____   __
//  \ \ /\ / / _` | '_ \ / __| '_ \ / _` | | '_ \@/ _` |/ _ \ \ / /
//   \ V  V / (_| | | | | (__| | | | (_| | | | | | (_| |  __/\ V /
//    \_/\_/ \__,_|_| |_|\___|_| |_|\__,_|_|_| |_|\__,_|\___| \_/
//
//

pragma solidity ^0.8.18;

/**
 * @title Owned
 * @dev Base contract for ownership management
 * This contract provides functionality for managing contract ownership
 * with support for ownership transfer and renunciation
 * 
 * Key features:
 * - Ownership assignment
 * - Ownership transfer
 * - Ownership renunciation
 * - Two-step ownership transfer
 * 
 * @custom:security
 * - Owner-only access control
 * - Safe ownership transfer
 * - Ownership renunciation capability
 */
contract Owned {

    /**
     * @dev Emitted when ownership is transferred
     * 
     * @param previousOwner Address of the previous owner
     * @param newOwner Address of the new owner
     */
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Modifier to restrict function access to owner only
     * 
     * @custom:requirements
     * - Caller must be the contract owner
     * 
     * @custom:reverts
     * - If caller is not the owner
     */
    modifier onlyOwner() {
        require(msg.sender == owner, "Not owner");
        _;
    }

    /**
     * @dev Public state variable for contract owner
     * 
     * @custom:usage
     * - Stores current owner address
     * - Accessible for external queries
     * - Modified through ownership functions
     */
    address public owner;

    /**
     * @dev Constructor assigns initial owner
     * 
     * @custom:effects
     * - Sets initial owner to contract deployer
     */
    constructor() {
        owner = msg.sender;
    }

    /**
     * @dev Public state variable for pending owner
     * 
     * @custom:usage
     * - Stores address of pending owner
     * - Used in two-step ownership transfer
     */
    address public newOwner;

    /**
     * @dev Transfers ownership to a new address
     * 
     * @param _newOwner Address of the new owner
     * 
     * @custom:requirements
     * - Caller must be the current owner
     * - New owner address must not be zero
     * 
     * @custom:effects
     * - Updates owner address
     * - Emits OwnershipTransferred event
     */
    function transferOwner(address _newOwner) public onlyOwner {
        require(_newOwner != address(0), "New owner is the zero address");
        emit OwnershipTransferred(owner, _newOwner);
        owner = _newOwner;
    }

    /**
     * @dev Initiates two-step ownership transfer
     * 
     * @param _newOwner Address of the new owner
     * 
     * @custom:requirements
     * - Caller must be the current owner
     * 
     * @custom:effects
     * - Sets pending owner address
     */
    function changeOwner(address _newOwner) public onlyOwner {
        newOwner = _newOwner;
    }

    /**
     * @dev Accepts pending ownership transfer
     * 
     * @custom:requirements
     * - Caller must be the pending owner
     * 
     * @custom:effects
     * - Updates owner address to pending owner
     */
    function acceptOwnership() public {
        if (msg.sender == newOwner) {
            owner = newOwner;
        }
    }

    /**
     * @dev Renounces ownership of the contract
     * 
     * @custom:requirements
     * - Caller must be the current owner
     * 
     * @custom:effects
     * - Sets owner to zero address
     * - Makes contract unowned
     */
    function renounceOwnership() public onlyOwner {
        owner = address(0);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.18;

/**
 * @title BasicStorageLib
 * @dev Library for basic storage operations with support for multiple data types
 * This library provides a structured approach to contract storage with a two-level key system
 * 
 * Key features:
 * - Support for multiple data types (uint, bool, address, bytes, string)
 * - Two-level key storage system for flexible data organization
 * - CRUD operations for each data type with consistent interface
 * - Gas-efficient storage patterns
 * 
 * @custom:security
 * - Internal access only to prevent unauthorized storage manipulation
 * - Safe storage operations with proper type enforcement
 * - Type-specific operations to prevent type confusion
 * - Consistent interface reduces likelihood of implementation errors
 * 
 * @custom:usage
 * - Used as a foundation for complex contract storage patterns
 * - Enables modular and organized data storage in contracts
 * - Simplifies storage access with standardized methods
 * - Perfect for contracts with diverse data storage needs
 */
library BasicStorageLib {

    /**
     * @dev Structure for storing uint values
     * Provides a two-level nested mapping for uint storage
     * 
     * @custom:usage
     * - Stores uint values with two-level key system for hierarchical data
     * - Used for numeric data storage such as balances, timestamps, amounts
     * - Primary key often represents a category, while innerKey represents specific item
     * - Essential for tracking numeric values in complex systems
     */
    struct UintData {
        mapping(bytes => mapping(bytes => uint))           _storage;
    }

    /**
     * @dev Structure for storing boolean values
     * Provides a two-level nested mapping for boolean storage
     * 
     * @custom:usage
     * - Stores boolean values with two-level key system for hierarchical data
     * - Used for flag and state storage such as activation status or permissions
     * - Efficient for representing binary states (true/false)
     * - Perfect for access control and feature toggles
     */
    struct BoolData {
        mapping(bytes => mapping(bytes => bool))           _storage;
    }

    /**
     * @dev Structure for storing address values
     * Provides a two-level nested mapping for address storage
     * 
     * @custom:usage
     * - Stores address values with two-level key system for hierarchical data
     * - Used for contract and account address storage
     * - Essential for tracking ownership, relationships between entities
     * - Enables role-based systems and contract registries
     */
    struct AddressData {
        mapping(bytes => mapping(bytes => address))        _storage;
    }

    /**
     * @dev Structure for storing bytes values
     * Provides a two-level nested mapping for bytes storage
     * 
     * @custom:usage
     * - Stores bytes values with two-level key system for hierarchical data
     * - Used for raw data storage such as cryptographic proofs, signatures
     * - Perfect for storing variable-length binary data
     * - Enables storage of complex serialized structures
     */
    struct BytesData {
        mapping(bytes => mapping(bytes => bytes))          _storage;
    }

    /**
     * @dev Structure for storing string values
     * Provides a two-level nested mapping for string storage
     * 
     * @custom:usage
     * - Stores string values with two-level key system for hierarchical data
     * - Used for text data storage such as names, descriptions, metadata
     * - Human-readable information storage
     * - Suitable for configuration parameters and user-facing content
     */
    struct StringData {
        mapping(bytes => mapping(bytes => string))         _storage;
    }

    /**
     * @dev Set uint value in storage
     * Assigns a uint value to a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization (e.g., user ID, token type)
     * @param innerKey Secondary key for specific attribute (e.g., balance, timestamp)
     * @param value Unsigned integer value to store
     * 
     * @custom:effects
     * - Updates storage with new value, overwriting any existing value
     * - Gas usage scales with key sizes, not with value size
     * - Optimized for single-slot storage operations
     */
    function setStorage(UintData storage self, bytes memory key, bytes memory innerKey, uint value) internal {
        self._storage[key][innerKey] = value;
    }

    /**
     * @dev Get uint value from storage
     * Retrieves a uint value from a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization
     * @param innerKey Secondary key for specific attribute
     * @return Stored uint value, or 0 if no value has been set
     * 
     * @custom:effects
     * - Read-only operation that doesn't modify state
     * - Returns default value (0) if entry doesn't exist
     * - Gas cost is constant regardless of value stored
     */
    function getStorage(UintData storage self, bytes memory key, bytes memory innerKey) internal view returns (uint) {
        return self._storage[key][innerKey];
    }

    /**
     * @dev Delete uint value from storage
     * Removes a uint value from a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization
     * @param innerKey Secondary key for specific attribute
     * 
     * @custom:effects
     * - Removes value from storage, setting it to default value (0)
     * - Gas refund is provided when clearing storage to zero
     * - Frees up storage space, potentially reducing contract storage costs
     */
    function delStorage(UintData storage self, bytes memory key, bytes memory innerKey) internal {
        delete self._storage[key][innerKey];
    }

    /**
     * @dev Set boolean value in storage
     * Assigns a boolean value to a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization (e.g., feature name, user ID)
     * @param innerKey Secondary key for specific flag (e.g., active, approved)
     * @param value Boolean value to store
     * 
     * @custom:effects
     * - Updates storage with new value, overwriting any existing value
     * - Gas efficient for storing binary state information
     * - Packs values efficiently in storage
     */
    function setStorage(BoolData storage self, bytes memory key, bytes memory innerKey, bool value) internal {
        self._storage[key][innerKey] = value;
    }

    /**
     * @dev Get boolean value from storage
     * Retrieves a boolean value from a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization
     * @param innerKey Secondary key for specific flag
     * @return Stored boolean value, or false if no value has been set
     * 
     * @custom:effects
     * - Read-only operation that doesn't modify state
     * - Returns default value (false) if entry doesn't exist
     * - Gas efficient for checking state conditions
     */
    function getStorage(BoolData storage self, bytes memory key, bytes memory innerKey) internal view returns (bool) {
        return self._storage[key][innerKey];
    }

    /**
     * @dev Delete boolean value from storage
     * Removes a boolean value from a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization
     * @param innerKey Secondary key for specific flag
     * 
     * @custom:effects
     * - Removes value from storage, setting it to default value (false)
     * - Gas refund is provided when clearing storage to zero
     * - Particularly efficient for boolean values
     */
    function delStorage(BoolData storage self, bytes memory key, bytes memory innerKey) internal {
        delete self._storage[key][innerKey];
    }

    /**
     * @dev Set address value in storage
     * Assigns an address value to a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization (e.g., role name, contract type)
     * @param innerKey Secondary key for specific relationship (e.g., owner, delegate)
     * @param value Ethereum address to store
     * 
     * @custom:effects
     * - Updates storage with new address, overwriting any existing value
     * - Stores full 20-byte Ethereum addresses
     * - Critical for tracking contract relationships and ownership
     */
    function setStorage(AddressData storage self, bytes memory key, bytes memory innerKey, address value) internal {
        self._storage[key][innerKey] = value;
    }

    /**
     * @dev Get address value from storage
     * Retrieves an address value from a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization
     * @param innerKey Secondary key for specific relationship
     * @return Stored address value, or address(0) if no value has been set
     * 
     * @custom:effects
     * - Read-only operation that doesn't modify state
     * - Returns default value (address(0)) if entry doesn't exist
     * - Used for permission checks and relationship verification
     */
    function getStorage(AddressData storage self, bytes memory key, bytes memory innerKey) internal view returns (address) {
        return self._storage[key][innerKey];
    }

    /**
     * @dev Delete address value from storage
     * Removes an address value from a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization
     * @param innerKey Secondary key for specific relationship
     * 
     * @custom:effects
     * - Removes value from storage, setting it to default value (address(0))
     * - Gas refund is provided when clearing storage to zero
     * - Important for revoking permissions or updating relationships
     */
    function delStorage(AddressData storage self, bytes memory key, bytes memory innerKey) internal {
        delete self._storage[key][innerKey];
    }

    /**
     * @dev Set bytes value in storage
     * Assigns a bytes value to a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization (e.g., data type, record ID)
     * @param innerKey Secondary key for specific data (e.g., signature, hash)
     * @param value Bytes data to store
     * 
     * @custom:effects
     * - Updates storage with new bytes data, overwriting any existing value
     * - Dynamically sized data is stored with length prefix
     * - Gas cost scales with the size of the bytes array
     * - Suitable for arbitrary binary data storage
     */
    function setStorage(BytesData storage self, bytes memory key, bytes memory innerKey, bytes memory value) internal {
        self._storage[key][innerKey] = value;
    }

    /**
     * @dev Get bytes value from storage
     * Retrieves a bytes value from a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization
     * @param innerKey Secondary key for specific data
     * @return Stored bytes value, or empty bytes if no value has been set
     * 
     * @custom:effects
     * - Read-only operation that doesn't modify state
     * - Returns default value (empty bytes) if entry doesn't exist
     * - Gas cost scales with the size of the retrieved data
     * - Used for retrieving serialized data, proofs, or signatures
     */
    function getStorage(BytesData storage self, bytes memory key, bytes memory innerKey) internal view returns (bytes memory) {
        return self._storage[key][innerKey];
    }

    /**
     * @dev Delete bytes value from storage
     * Removes a bytes value from a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization
     * @param innerKey Secondary key for specific data
     * 
     * @custom:effects
     * - Removes value from storage, setting it to default value (empty bytes)
     * - Gas refund is provided when clearing storage
     * - More gas efficient for larger data due to storage refunds
     * - Complete removal of variable-length data
     */
    function delStorage(BytesData storage self, bytes memory key, bytes memory innerKey) internal {
        delete self._storage[key][innerKey];
    }

    /**
     * @dev Set string value in storage
     * Assigns a string value to a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization (e.g., metadata type, record ID)
     * @param innerKey Secondary key for specific text (e.g., name, description)
     * @param value String data to store
     * 
     * @custom:effects
     * - Updates storage with new string, overwriting any existing value
     * - Strings are stored as UTF-8 encoded bytes with length prefix
     * - Gas cost scales with the length of the string
     * - Ideal for human-readable text storage
     */
    function setStorage(StringData storage self, bytes memory key, bytes memory innerKey, string memory value) internal {
        self._storage[key][innerKey] = value;
    }

    /**
     * @dev Get string value from storage
     * Retrieves a string value from a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization
     * @param innerKey Secondary key for specific text
     * @return Stored string value, or empty string if no value has been set
     * 
     * @custom:effects
     * - Read-only operation that doesn't modify state
     * - Returns default value (empty string) if entry doesn't exist
     * - Gas cost scales with the length of the retrieved string
     * - Used for retrieving human-readable configuration and metadata
     */
    function getStorage(StringData storage self, bytes memory key, bytes memory innerKey) internal view returns (string memory) {
        return self._storage[key][innerKey];
    }

    /**
     * @dev Delete string value from storage
     * Removes a string value from a specific key pair in storage
     * 
     * @param self Storage structure reference
     * @param key Primary key for categorization
     * @param innerKey Secondary key for specific text
     * 
     * @custom:effects
     * - Removes value from storage, setting it to default value (empty string)
     * - Gas refund is provided when clearing storage
     * - More gas efficient for longer strings due to storage refunds
     * - Complete removal of variable-length text data
     */
    function delStorage(StringData storage self, bytes memory key, bytes memory innerKey) internal {
        delete self._storage[key][innerKey];
    }

}

File 5 of 5 : OracleStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.18;

import "../components/BasicStorage.sol";

/**
 * @title OracleStorage
 * @dev Storage contract for Oracle functionality
 * This contract provides:
 * - Price data storage
 * - Storeman group configuration storage
 * - Admin role management
 */
contract OracleStorage is BasicStorage {
  /************************************************************
    **
    ** STRUCTURE DEFINATIONS
    **
    ************************************************************/
  /**
   * @notice Configuration structure for Storeman Group
   * @dev Contains all necessary parameters for storeman group operation
   * @param deposit Required deposit amount
   * @param chain Array of chain IDs [source, destination]
   * @param curve Array of curve parameters
   * @param gpk1 First group public key
   * @param gpk2 Second group public key
   * @param startTime Start time of the group
   * @param endTime End time of the group
   * @param status Current status of the group
   * @param isDebtClean Whether all debts are cleared
   */
  struct StoremanGroupConfig {
    uint    deposit;
    uint[2] chain;
    uint[2] curve;
    bytes   gpk1;
    bytes   gpk2;
    uint    startTime;
    uint    endTime;
    uint8   status;
    bool    isDebtClean;
  }

  /************************************************************
    **
    ** VARIABLES
    **
    ************************************************************/
  /// @notice Mapping from token symbol to its current price
  /// @dev Used to store and retrieve token prices
  mapping(bytes32 => uint) public mapPrices;

  /// @notice Mapping from storeman group ID to its configuration
  /// @dev Stores all configuration parameters for each storeman group
  mapping(bytes32 => StoremanGroupConfig) public mapStoremanGroupConfig;

  /// @notice Address of the admin account
  /// @dev Admin has special privileges for contract management
  address public admin;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"SetAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"isDebtClean","type":"bool"}],"name":"SetDebtClean","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"uint8","name":"status","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"deposit","type":"uint256"},{"indexed":false,"internalType":"uint256[2]","name":"chain","type":"uint256[2]"},{"indexed":false,"internalType":"uint256[2]","name":"curve","type":"uint256[2]"},{"indexed":false,"internalType":"bytes","name":"gpk1","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"gpk2","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"SetStoremanGroupConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"uint8","name":"status","type":"uint8"}],"name":"SetStoremanGroupStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"deposit","type":"uint256"}],"name":"UpdateDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32[]","name":"keys","type":"bytes32[]"},{"indexed":false,"internalType":"uint256[]","name":"prices","type":"uint256[]"}],"name":"UpdatePrice","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"changeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"smgID","type":"bytes32"}],"name":"getDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getStoremanGroupConfig","outputs":[{"internalType":"bytes32","name":"groupId","type":"bytes32"},{"internalType":"uint8","name":"status","type":"uint8"},{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"uint256","name":"chain1","type":"uint256"},{"internalType":"uint256","name":"chain2","type":"uint256"},{"internalType":"uint256","name":"curve1","type":"uint256"},{"internalType":"uint256","name":"curve2","type":"uint256"},{"internalType":"bytes","name":"gpk1","type":"bytes"},{"internalType":"bytes","name":"gpk2","type":"bytes"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getStoremanGroupStatus","outputs":[{"internalType":"uint8","name":"status","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"keys","type":"bytes32[]"}],"name":"getValues","outputs":[{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"storemanGroupId","type":"bytes32"}],"name":"isDebtClean","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mapPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mapStoremanGroupConfig","outputs":[{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"bytes","name":"gpk1","type":"bytes"},{"internalType":"bytes","name":"gpk2","type":"bytes"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint8","name":"status","type":"uint8"},{"internalType":"bool","name":"isDebtClean","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"storemanGroupId","type":"bytes32"},{"internalType":"bool","name":"isClean","type":"bool"}],"name":"setDebtClean","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint8","name":"status","type":"uint8"},{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"uint256[2]","name":"chain","type":"uint256[2]"},{"internalType":"uint256[2]","name":"curve","type":"uint256[2]"},{"internalType":"bytes","name":"gpk1","type":"bytes"},{"internalType":"bytes","name":"gpk2","type":"bytes"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"setStoremanGroupConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint8","name":"status","type":"uint8"}],"name":"setStoremanGroupStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"smgID","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"updateDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"keys","type":"bytes32[]"},{"internalType":"uint256[]","name":"prices","type":"uint256[]"}],"name":"updatePrice","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50600880546001600160a01b031916331790556114ec806100326000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80637a86983f116100b8578063b2bffcc31161007c578063b2bffcc31461032d578063ba54a0e814610340578063d4ee1d9014610360578063e516ce6914610373578063ea872e1d14610386578063f851a4401461039957600080fd5b80637a86983f146102695780637cf0f5cd146102895780638da5cb5b1461029c57806395e8d68a146102c7578063a6f9dae11461031a57600080fd5b8063660b3439116100ff578063660b3439146102055780636984394014610218578063704b6c0214610246578063715018a61461025957806379ba50971461026157600080fd5b80631b0522e81461013c57806344cefb69146101655780634af722341461018f5780634fb2e45d146101b55780635d8026c5146101ca575b600080fd5b61014f61014a366004610dd2565b6103ac565b60405161015c9190610e14565b60405180910390f35b610178610173366004610e58565b610460565b60405161015c9b9a99989796959493929190610eb7565b6101a261019d366004610e58565b610606565b60405161015c9796959493929190610f2a565b6101c86101c3366004610f81565b610759565b005b6101f56101d8366004610e58565b600090815260066020526040902060090154610100900460ff1690565b604051901515815260200161015c565b6101c8610213366004611020565b61083e565b610238610226366004610e58565b60009081526005602052604090205490565b60405190815260200161015c565b6101c8610254366004610f81565b610963565b6101c86109e1565b6101c8610a1d565b610238610277366004610e58565b60009081526006602052604090205490565b6101c86102973660046110f2565b610a54565b6008546102af906001600160a01b031681565b6040516001600160a01b03909116815260200161015c565b6102fb6102d5366004610e58565b60009081526006602052604090206009810154600782015460089092015460ff90911692565b6040805160ff909416845260208401929092529082015260600161015c565b6101c8610328366004610f81565b610af9565b6101c861033b366004611127565b610b45565b61023861034e366004610e58565b60056020526000908152604090205481565b6009546102af906001600160a01b031681565b6101c8610381366004611193565b610c6f565b6101c86103943660046111bf565b610d02565b6007546102af906001600160a01b031681565b60608167ffffffffffffffff8111156103c7576103c76111e1565b6040519080825280602002602001820160405280156103f0578160200160208202803683370190505b50905060005b828110156104595760056000858584818110610414576104146111f7565b9050602002013581526020019081526020016000205482828151811061043c5761043c6111f7565b6020908102919091010152806104518161120d565b9150506103f6565b5092915050565b600081815260066020526040812060098101548154600183015460028401546003850154600486015460059096018054899860ff9097169795969495939492939260609283928291906104b290611234565b80601f01602080910402602001604051908101604052809291908181526020018280546104de90611234565b801561052b5780601f106105005761010080835404028352916020019161052b565b820191906000526020600020905b81548152906001019060200180831161050e57829003601f168201915b50505050509350600660008d8152602001908152602001600020600601805461055390611234565b80601f016020809104026020016040519081016040528092919081815260200182805461057f90611234565b80156105cc5780601f106105a1576101008083540402835291602001916105cc565b820191906000526020600020905b8154815290600101906020018083116105af57829003601f168201915b50505060009e8f52505060066020526040909c2060078101546008909101549b9d9a9c999b989a9799969895979496959094909350915050565b6006602052600090815260409020805460058201805491929161062890611234565b80601f016020809104026020016040519081016040528092919081815260200182805461065490611234565b80156106a15780601f10610676576101008083540402835291602001916106a1565b820191906000526020600020905b81548152906001019060200180831161068457829003601f168201915b5050505050908060060180546106b690611234565b80601f01602080910402602001604051908101604052809291908181526020018280546106e290611234565b801561072f5780601f106107045761010080835404028352916020019161072f565b820191906000526020600020905b81548152906001019060200180831161071257829003601f168201915b50505050600783015460088401546009909401549293909290915060ff8082169161010090041687565b6008546001600160a01b0316331461078c5760405162461bcd60e51b81526004016107839061126e565b60405180910390fd5b6001600160a01b0381166107e25760405162461bcd60e51b815260206004820152601d60248201527f4e6577206f776e657220697320746865207a65726f20616464726573730000006044820152606401610783565b6008546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600880546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b031633148061086157506008546001600160a01b031633145b61087d5760405162461bcd60e51b815260040161078390611291565b60008b81526006602090815260409091208a815560098101805460ff191660ff8e1617905589356001820155898201356002820155883560038201559088013560048201556005016108d0868883611303565b5060008b8152600660208190526040909120016108ee848683611303565b5060008b8152600660205260409081902060078101849055600801829055518b907f6c630ca4148e623628a03dca265004956b6e5f8780dd60718411c8aaaa9a5c4b9061094e908d908d908d908d908d908d908d908d908d908d906113ed565b60405180910390a25050505050505050505050565b6008546001600160a01b0316331461098d5760405162461bcd60e51b81526004016107839061126e565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a272403b402d892977df56625f4164ccaf70ca3863991c43ecfe76a6905b0a19060200160405180910390a150565b6008546001600160a01b03163314610a0b5760405162461bcd60e51b81526004016107839061126e565b600880546001600160a01b0319169055565b6009546001600160a01b03163303610a5257600954600880546001600160a01b0319166001600160a01b039092169190911790555b565b6007546001600160a01b0316331480610a7757506008546001600160a01b031633145b610a935760405162461bcd60e51b815260040161078390611291565b6000828152600660205260409081902060090180548315156101000261ff00199091161790555182907fd8d967123b353fe621f065bf16a92912d1b28f5ca3202cba95e6962f7fe83ff890610aed90841515815260200190565b60405180910390a25050565b6008546001600160a01b03163314610b235760405162461bcd60e51b81526004016107839061126e565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b0316331480610b6857506008546001600160a01b031633145b610b845760405162461bcd60e51b815260040161078390611291565b828114610bc55760405162461bcd60e51b815260206004820152600f60248201526e6c656e677468206e6f742073616d6560881b6044820152606401610783565b60005b83811015610c2b57828282818110610be257610be26111f7565b9050602002013560056000878785818110610bff57610bff6111f7565b905060200201358152602001908152602001600020819055508080610c239061120d565b915050610bc8565b507f6e65233ef2c857cd6bc5a40c516989c41a667fd5e3c0fa73e02414d17937521684848484604051610c619493929190611484565b60405180910390a150505050565b6007546001600160a01b0316331480610c9257506008546001600160a01b031633145b610cae5760405162461bcd60e51b815260040161078390611291565b600082815260066020908152604091829020600901805460ff191660ff8516908117909155915191825283917f444e160ab68acf79ea04c1b91f81237ea93afab2cdadfc4086e5ce5e93baeb2b9101610aed565b6007546001600160a01b0316331480610d2557506008546001600160a01b031633145b610d415760405162461bcd60e51b815260040161078390611291565b600082815260066020526040908190208290555182907f50d6929552e90ba7b4193a743fc16c69e74fae125629e0957d1ed0c31627ae9d90610aed9084815260200190565b60008083601f840112610d9857600080fd5b50813567ffffffffffffffff811115610db057600080fd5b6020830191508360208260051b8501011115610dcb57600080fd5b9250929050565b60008060208385031215610de557600080fd5b823567ffffffffffffffff811115610dfc57600080fd5b610e0885828601610d86565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610e4c57835183529284019291840191600101610e30565b50909695505050505050565b600060208284031215610e6a57600080fd5b5035919050565b6000815180845260005b81811015610e9757602081850181015186830182015201610e7b565b506000602082860101526020601f19601f83011685010191505092915050565b60006101608d835260ff8d1660208401528b60408401528a60608401528960808401528860a08401528760c08401528060e0840152610ef881840188610e71565b9050828103610100840152610f0d8187610e71565b610120840195909552505061014001529998505050505050505050565b87815260e060208201526000610f4360e0830189610e71565b8281036040840152610f558189610e71565b91505085606083015284608083015260ff841660a083015282151560c083015298975050505050505050565b600060208284031215610f9357600080fd5b81356001600160a01b0381168114610faa57600080fd5b9392505050565b803560ff81168114610fc257600080fd5b919050565b8060408101831015610fd857600080fd5b92915050565b60008083601f840112610ff057600080fd5b50813567ffffffffffffffff81111561100857600080fd5b602083019150836020828501011115610dcb57600080fd5b60008060008060008060008060008060006101608c8e03121561104257600080fd5b8b359a5061105260208d01610fb1565b995060408c013598506110688d60608e01610fc7565b97506110778d60a08e01610fc7565b965067ffffffffffffffff8060e08e0135111561109357600080fd5b6110a38e60e08f01358f01610fde565b90975095506101008d01358110156110ba57600080fd5b506110cc8d6101008e01358e01610fde565b9b9e9a9d50989b979a969995989497949695610120860135956101400135945092505050565b6000806040838503121561110557600080fd5b823591506020830135801515811461111c57600080fd5b809150509250929050565b6000806000806040858703121561113d57600080fd5b843567ffffffffffffffff8082111561115557600080fd5b61116188838901610d86565b9096509450602087013591508082111561117a57600080fd5b5061118787828801610d86565b95989497509550505050565b600080604083850312156111a657600080fd5b823591506111b660208401610fb1565b90509250929050565b600080604083850312156111d257600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006001820161122d57634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c9082168061124857607f821691505b60208210810361126857634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600990820152682737ba1037bbb732b960b91b604082015260600190565b6020808252600990820152683737ba1030b236b4b760b91b604082015260600190565b601f8211156112fe57600081815260208120601f850160051c810160208610156112db5750805b601f850160051c820191505b818110156112fa578281556001016112e7565b5050505b505050565b67ffffffffffffffff83111561131b5761131b6111e1565b61132f836113298354611234565b836112b4565b6000601f841160018114611363576000851561134b5750838201355b600019600387901b1c1916600186901b1783556113bd565b600083815260209020601f19861690835b828110156113945786850135825560209485019460019092019101611374565b50868210156113b15760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600061014060ff8d1683528b602084015260408b604085013760408a60808501378060c0840152611421818401898b6113c4565b905082810360e08401526114368187896113c4565b6101008401959095525050610120015298975050505050505050565b81835260006001600160fb1b0383111561146b57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000611498604083018688611452565b82810360208401526114ab818587611452565b97965050505050505056fea2646970667358221220d69b121b293f6f4c5bd045a4cc6724270cec5a6c6ae316288e9e2191ea2685d564736f6c63430008120033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101375760003560e01c80637a86983f116100b8578063b2bffcc31161007c578063b2bffcc31461032d578063ba54a0e814610340578063d4ee1d9014610360578063e516ce6914610373578063ea872e1d14610386578063f851a4401461039957600080fd5b80637a86983f146102695780637cf0f5cd146102895780638da5cb5b1461029c57806395e8d68a146102c7578063a6f9dae11461031a57600080fd5b8063660b3439116100ff578063660b3439146102055780636984394014610218578063704b6c0214610246578063715018a61461025957806379ba50971461026157600080fd5b80631b0522e81461013c57806344cefb69146101655780634af722341461018f5780634fb2e45d146101b55780635d8026c5146101ca575b600080fd5b61014f61014a366004610dd2565b6103ac565b60405161015c9190610e14565b60405180910390f35b610178610173366004610e58565b610460565b60405161015c9b9a99989796959493929190610eb7565b6101a261019d366004610e58565b610606565b60405161015c9796959493929190610f2a565b6101c86101c3366004610f81565b610759565b005b6101f56101d8366004610e58565b600090815260066020526040902060090154610100900460ff1690565b604051901515815260200161015c565b6101c8610213366004611020565b61083e565b610238610226366004610e58565b60009081526005602052604090205490565b60405190815260200161015c565b6101c8610254366004610f81565b610963565b6101c86109e1565b6101c8610a1d565b610238610277366004610e58565b60009081526006602052604090205490565b6101c86102973660046110f2565b610a54565b6008546102af906001600160a01b031681565b6040516001600160a01b03909116815260200161015c565b6102fb6102d5366004610e58565b60009081526006602052604090206009810154600782015460089092015460ff90911692565b6040805160ff909416845260208401929092529082015260600161015c565b6101c8610328366004610f81565b610af9565b6101c861033b366004611127565b610b45565b61023861034e366004610e58565b60056020526000908152604090205481565b6009546102af906001600160a01b031681565b6101c8610381366004611193565b610c6f565b6101c86103943660046111bf565b610d02565b6007546102af906001600160a01b031681565b60608167ffffffffffffffff8111156103c7576103c76111e1565b6040519080825280602002602001820160405280156103f0578160200160208202803683370190505b50905060005b828110156104595760056000858584818110610414576104146111f7565b9050602002013581526020019081526020016000205482828151811061043c5761043c6111f7565b6020908102919091010152806104518161120d565b9150506103f6565b5092915050565b600081815260066020526040812060098101548154600183015460028401546003850154600486015460059096018054899860ff9097169795969495939492939260609283928291906104b290611234565b80601f01602080910402602001604051908101604052809291908181526020018280546104de90611234565b801561052b5780601f106105005761010080835404028352916020019161052b565b820191906000526020600020905b81548152906001019060200180831161050e57829003601f168201915b50505050509350600660008d8152602001908152602001600020600601805461055390611234565b80601f016020809104026020016040519081016040528092919081815260200182805461057f90611234565b80156105cc5780601f106105a1576101008083540402835291602001916105cc565b820191906000526020600020905b8154815290600101906020018083116105af57829003601f168201915b50505060009e8f52505060066020526040909c2060078101546008909101549b9d9a9c999b989a9799969895979496959094909350915050565b6006602052600090815260409020805460058201805491929161062890611234565b80601f016020809104026020016040519081016040528092919081815260200182805461065490611234565b80156106a15780601f10610676576101008083540402835291602001916106a1565b820191906000526020600020905b81548152906001019060200180831161068457829003601f168201915b5050505050908060060180546106b690611234565b80601f01602080910402602001604051908101604052809291908181526020018280546106e290611234565b801561072f5780601f106107045761010080835404028352916020019161072f565b820191906000526020600020905b81548152906001019060200180831161071257829003601f168201915b50505050600783015460088401546009909401549293909290915060ff8082169161010090041687565b6008546001600160a01b0316331461078c5760405162461bcd60e51b81526004016107839061126e565b60405180910390fd5b6001600160a01b0381166107e25760405162461bcd60e51b815260206004820152601d60248201527f4e6577206f776e657220697320746865207a65726f20616464726573730000006044820152606401610783565b6008546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600880546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b031633148061086157506008546001600160a01b031633145b61087d5760405162461bcd60e51b815260040161078390611291565b60008b81526006602090815260409091208a815560098101805460ff191660ff8e1617905589356001820155898201356002820155883560038201559088013560048201556005016108d0868883611303565b5060008b8152600660208190526040909120016108ee848683611303565b5060008b8152600660205260409081902060078101849055600801829055518b907f6c630ca4148e623628a03dca265004956b6e5f8780dd60718411c8aaaa9a5c4b9061094e908d908d908d908d908d908d908d908d908d908d906113ed565b60405180910390a25050505050505050505050565b6008546001600160a01b0316331461098d5760405162461bcd60e51b81526004016107839061126e565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a272403b402d892977df56625f4164ccaf70ca3863991c43ecfe76a6905b0a19060200160405180910390a150565b6008546001600160a01b03163314610a0b5760405162461bcd60e51b81526004016107839061126e565b600880546001600160a01b0319169055565b6009546001600160a01b03163303610a5257600954600880546001600160a01b0319166001600160a01b039092169190911790555b565b6007546001600160a01b0316331480610a7757506008546001600160a01b031633145b610a935760405162461bcd60e51b815260040161078390611291565b6000828152600660205260409081902060090180548315156101000261ff00199091161790555182907fd8d967123b353fe621f065bf16a92912d1b28f5ca3202cba95e6962f7fe83ff890610aed90841515815260200190565b60405180910390a25050565b6008546001600160a01b03163314610b235760405162461bcd60e51b81526004016107839061126e565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b0316331480610b6857506008546001600160a01b031633145b610b845760405162461bcd60e51b815260040161078390611291565b828114610bc55760405162461bcd60e51b815260206004820152600f60248201526e6c656e677468206e6f742073616d6560881b6044820152606401610783565b60005b83811015610c2b57828282818110610be257610be26111f7565b9050602002013560056000878785818110610bff57610bff6111f7565b905060200201358152602001908152602001600020819055508080610c239061120d565b915050610bc8565b507f6e65233ef2c857cd6bc5a40c516989c41a667fd5e3c0fa73e02414d17937521684848484604051610c619493929190611484565b60405180910390a150505050565b6007546001600160a01b0316331480610c9257506008546001600160a01b031633145b610cae5760405162461bcd60e51b815260040161078390611291565b600082815260066020908152604091829020600901805460ff191660ff8516908117909155915191825283917f444e160ab68acf79ea04c1b91f81237ea93afab2cdadfc4086e5ce5e93baeb2b9101610aed565b6007546001600160a01b0316331480610d2557506008546001600160a01b031633145b610d415760405162461bcd60e51b815260040161078390611291565b600082815260066020526040908190208290555182907f50d6929552e90ba7b4193a743fc16c69e74fae125629e0957d1ed0c31627ae9d90610aed9084815260200190565b60008083601f840112610d9857600080fd5b50813567ffffffffffffffff811115610db057600080fd5b6020830191508360208260051b8501011115610dcb57600080fd5b9250929050565b60008060208385031215610de557600080fd5b823567ffffffffffffffff811115610dfc57600080fd5b610e0885828601610d86565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610e4c57835183529284019291840191600101610e30565b50909695505050505050565b600060208284031215610e6a57600080fd5b5035919050565b6000815180845260005b81811015610e9757602081850181015186830182015201610e7b565b506000602082860101526020601f19601f83011685010191505092915050565b60006101608d835260ff8d1660208401528b60408401528a60608401528960808401528860a08401528760c08401528060e0840152610ef881840188610e71565b9050828103610100840152610f0d8187610e71565b610120840195909552505061014001529998505050505050505050565b87815260e060208201526000610f4360e0830189610e71565b8281036040840152610f558189610e71565b91505085606083015284608083015260ff841660a083015282151560c083015298975050505050505050565b600060208284031215610f9357600080fd5b81356001600160a01b0381168114610faa57600080fd5b9392505050565b803560ff81168114610fc257600080fd5b919050565b8060408101831015610fd857600080fd5b92915050565b60008083601f840112610ff057600080fd5b50813567ffffffffffffffff81111561100857600080fd5b602083019150836020828501011115610dcb57600080fd5b60008060008060008060008060008060006101608c8e03121561104257600080fd5b8b359a5061105260208d01610fb1565b995060408c013598506110688d60608e01610fc7565b97506110778d60a08e01610fc7565b965067ffffffffffffffff8060e08e0135111561109357600080fd5b6110a38e60e08f01358f01610fde565b90975095506101008d01358110156110ba57600080fd5b506110cc8d6101008e01358e01610fde565b9b9e9a9d50989b979a969995989497949695610120860135956101400135945092505050565b6000806040838503121561110557600080fd5b823591506020830135801515811461111c57600080fd5b809150509250929050565b6000806000806040858703121561113d57600080fd5b843567ffffffffffffffff8082111561115557600080fd5b61116188838901610d86565b9096509450602087013591508082111561117a57600080fd5b5061118787828801610d86565b95989497509550505050565b600080604083850312156111a657600080fd5b823591506111b660208401610fb1565b90509250929050565b600080604083850312156111d257600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006001820161122d57634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c9082168061124857607f821691505b60208210810361126857634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600990820152682737ba1037bbb732b960b91b604082015260600190565b6020808252600990820152683737ba1030b236b4b760b91b604082015260600190565b601f8211156112fe57600081815260208120601f850160051c810160208610156112db5750805b601f850160051c820191505b818110156112fa578281556001016112e7565b5050505b505050565b67ffffffffffffffff83111561131b5761131b6111e1565b61132f836113298354611234565b836112b4565b6000601f841160018114611363576000851561134b5750838201355b600019600387901b1c1916600186901b1783556113bd565b600083815260209020601f19861690835b828110156113945786850135825560209485019460019092019101611374565b50868210156113b15760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600061014060ff8d1683528b602084015260408b604085013760408a60808501378060c0840152611421818401898b6113c4565b905082810360e08401526114368187896113c4565b6101008401959095525050610120015298975050505050505050565b81835260006001600160fb1b0383111561146b57600080fd5b8260051b80836020870137939093016020019392505050565b604081526000611498604083018688611452565b82810360208401526114ab818587611452565b97965050505050505056fea2646970667358221220d69b121b293f6f4c5bd045a4cc6724270cec5a6c6ae316288e9e2191ea2685d564736f6c63430008120033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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