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.
/**
* @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);
}
}
Need to add an Etherscan URL for each deployment.
- Sepolia Testnet:
TBD
- Ethereum Mainnet:
TBD