Standardized smart contract interface for on-chain JSON state output and key-value version control history. Authored by LexClinic (lex.clinic) & Kyle Smith (@Bestape).
Defining human-readable, RESTful Web3 smart contract state for legal engineering runtimes.
ERC-7827 defines a standardized interface for smart contracts to maintain an on-chain JSON object with full historical version control for every key-value pair.
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.0;
interface IERC7827 {
/// @notice Returns the current state of the JSON object as a string
function json() external view returns (string memory);
/// @notice Returns chronologically ordered version history for a key
function version(string calldata key) external view returns (string memory);
/// @notice Writes new values to the on-chain JSON object
function write(
string[] calldata keys,
string[] calldata values,
bool replace
) external;
}