EthscriptionsProtocol

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "EthscriptionsProtocol.sol": {
      "content": "// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;

contract EthscriptionsProtocol {
    // ESIP-1
    // https://docs.ethscriptions.com/esips/accepted-esips/esip-1-smart-contract-ethscription-transfers
    event ethscriptions_protocol_TransferEthscription(
        address indexed recipient,
        bytes32 indexed ethscriptionId
    );

    // ESIP-2
    // https://docs.ethscriptions.com/esips/accepted-esips/esip-2-safe-trustless-smart-contract-ethscription-escrow
    event ethscriptions_protocol_TransferEthscriptionForPreviousOwner(
        address indexed previousOwner,
        address indexed recipient,
        bytes32 indexed ethscriptionId
    );

    // ESIP-3
    // https://docs.ethscriptions.com/esips/accepted-esips/esip-3-smart-contract-ethscription-creations
    event ethscriptions_protocol_CreateEthscription(
        address indexed initialOwner,
        string contentURI
    );

    // Eventual ESIP, similar to ESIP-3 but respecting the `msg.sender` as creator not the contract
    // https://github.com/ethscriptions-protocol/ESIP-Discussion/issues/25
    event ethscriptions_protocol_CreateEthscriptionFrom(
        address indexed initialOwner,
        string contentURI
    );

    function transferEthscription(
        address recipient,
        bytes32 ethscriptionId
    ) external {
        emit ethscriptions_protocol_TransferEthscription(
            recipient,
            ethscriptionId
        );
    }

    function transferEthscriptionForPreviousOwner(
        address previousOwner,
        address recipient,
        bytes32 ethscriptionId
    ) external {
        emit ethscriptions_protocol_TransferEthscriptionForPreviousOwner(
            previousOwner,
            recipient,
            ethscriptionId
        );
    }

    function createEthscription(
        string memory dataURI,
        address initialOwner
    ) external {
        emit ethscriptions_protocol_CreateEthscription(initialOwner, dataURI);
    }

    function createEthscriptionFrom(
        string memory dataURI,
        address initialOwner
    ) external {
        emit ethscriptions_protocol_CreateEthscriptionFrom(
            initialOwner,
            dataURI
        );
    }

    // Useful for escaping multiple ethscriptions at once, if a wallet has attached some sort of drainer.
    // This would only work if drained EOA has this account as EIP-7702.
    function escapeEthscriptions(
        bytes32[] memory ids,
        address newOwner
    ) external payable {
        for (uint256 i = 0; i < ids.length; i++) {
            emit ethscriptions_protocol_TransferEthscription(newOwner, ids[i]);
        }
    }
}
"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "remappings": []
  }
}}

Tags:
Factory|addr:0xdbb21c21a873ffe51ec6354a2b909acbdb20f24f|verified:true|block:23571497|tx:0xf18294886e630b69fe0c4334168327c9fb08b628dddaa86a2760d86f5c2be6e7|first_check:1760427580

Submitted on: 2025-10-14 09:39:40

Comments

Log in to comment.

No comments yet.