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.
json(): Real-time on-chain JSON string output representing current contract state.version(key): Returns a chronologically ordered array of all historical values for a key.write(keys, values, replace): Atomic key-value write operations with overwrite protection.// 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;
}