Coder Social home page Coder Social logo

davidtaikocha / simpubprotocol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simpubprotocol/simpubprotocol

0.0 0.0 0.0 109 KB

A dead simple protocol that allows the publication of any data to the blockchain.

Nix 0.01% Makefile 0.03% Solidity 99.96%

simpubprotocol's Introduction

Simple Publishing Protocol

A dead simple protocol that allows the publication of any data to the blockchain. It allows various clients to access and interact with the published data, and apply their own client-side protocols. This protocol may be completely useless or very useful.

Code

/**
 * @title Simple Publishing Protocol
 * @author Daniel Wang <[email protected]>
 * @dev A dead simple contract that allows the publication of any data to the
 * blockchain. It may be completely useless or very useful.
 */
contract SimPubProtocol {
    /**
     * @dev Emitted when a user publishes data.
     * @param user The address of the user who published the data.
     * @param spec An ID representing the nature of the published data.
     * @param uriType The type of the URI indicating where to retrieve the data.
     * @param uri The URI that points to the published data.
     * @param burn The amount of Ether burned (if any) to increase visibility.
     */
    event Publication(
        address indexed user,
        bytes32 indexed spec,
        bytes32 indexed uriType,
        string uri,
        uint256 burn
    );

    /**
     * @notice Publish any data, optionally burning Ether to increase attention.
     * @dev The publish function allows a user to broadcast data to the
     * blockchain.
     * @param spec An ID indicating the nature of the published data.
     * @param uriType The type of the URI specifying where the data can be
     * accessed.
     * @param uri The URI of the published data.
     */
    function publish(
        bytes32 spec,
        bytes32 uriType,
        string calldata uri
    )
        external
        payable
    {
        // Do nothing, but
        emit Publication(msg.sender, spec, uriType, uri, msg.value);
    }
}

Deployments

Need to add an Etherscan URL for each deployment.

  • Sepolia Testnet: TBD
  • Ethereum Mainnet: TBD

simpubprotocol's People

Contributors

dantaik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.