ArraysPlay

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/ArraysPlay.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;
import "./utils/UiProjectStamp.sol";
contract ArraysPlay is UiProjectStamp {
    event ItemAdded(address indexed by, string item);
    event ItemPopped(address indexed by, string item);
    string[] public items;
    constructor(bytes32 u) UiProjectStamp(u) {}
    function addItem(string calldata s) external { items.push(s); emit ItemAdded(msg.sender,s); }
    function popLast() external { require(items.length>0,"empty"); string memory v=items[items.length-1]; items.pop(); emit ItemPopped(msg.sender,v); }
}
"
    },
    "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:0x8f6face2b5813e4c111d2a910d79b0f0ead2a49b|verified:true|block:23471192|tx:0xececd412b73560f0f8ddf303ccfda092b47f74d2106f949f84c58db688efbe6e|first_check:1759219807

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

Comments

Log in to comment.

No comments yet.