MappingsPlay

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "contracts/MappingsPlay.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;
import "./utils/UiProjectStamp.sol";
contract MappingsPlay is UiProjectStamp {
    mapping(address=>mapping(bytes32=>uint256)) public prefs;
    event PrefSaved(address indexed by, bytes32 key, uint256 value);
    event PrefCleared(address indexed by, bytes32 key);
    constructor(bytes32 u) UiProjectStamp(u) {}
    function savePref(bytes32 key, uint256 value) external { prefs[msg.sender][key]=value; emit PrefSaved(msg.sender,key,value); }
    function clearPref(bytes32 key) external { delete prefs[msg.sender][key]; emit PrefCleared(msg.sender,key); }
}
"
    },
    "contracts/utils/UiProjectStamp.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;

abstract contract UiProjectStamp {
    bytes32 private immutable _BUILD_HASH;
    uint48  private immutable _BUILT_AT;
    uint16  private immutable _VARIANT;

    constructor(bytes32 uiLabelHash_) {
        bytes32 w = keccak256(abi.encode(block.chainid, msg.sender, uiLabelHash_));
        _BUILD_HASH = keccak256(abi.encode(w, address(this)));
        _BUILT_AT   = uint48(block.timestamp);
        _VARIANT    = uint16(uint256(_BUILD_HASH));
    }
    function project() public view returns (bytes32 buildHash, uint48 builtAt, uint16 variant) {
        return (_BUILD_HASH, _BUILT_AT, _VARIANT);
    }
}
"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "evmVersion": "cancun",
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    }
  }
}}

Tags:
Factory|addr:0x1b5d0d4fb181a4119884fb46a57bec9a8b174510|verified:true|block:23471202|tx:0x059d67376a61039a8a8d59b569eff42d82659abea68c48a985dfd642d11e39c6|first_check:1759219848

Submitted on: 2025-09-30 10:10:48

Comments

Log in to comment.

No comments yet.