@river-build/generated
Version:
## How to generate contract types
910 lines • 26.8 kB
JSON
{
"compiler": {
"version": "0.8.24+commit.e11b9ed9"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32",
"indexed": false
},
{
"internalType": "address[]",
"name": "nodes",
"type": "address[]",
"indexed": false
},
{
"internalType": "bytes32",
"name": "genesisMiniblockHash",
"type": "bytes32",
"indexed": false
},
{
"internalType": "bytes",
"name": "genesisMiniblock",
"type": "bytes",
"indexed": false
}
],
"type": "event",
"name": "StreamAllocated",
"anonymous": false
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32",
"indexed": false
},
{
"internalType": "bytes32",
"name": "genesisMiniblockHash",
"type": "bytes32",
"indexed": false
},
{
"internalType": "struct Stream",
"name": "stream",
"type": "tuple",
"components": [
{
"internalType": "bytes32",
"name": "lastMiniblockHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "lastMiniblockNum",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "reserved0",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "flags",
"type": "uint64"
},
{
"internalType": "address[]",
"name": "nodes",
"type": "address[]"
}
],
"indexed": false
}
],
"type": "event",
"name": "StreamCreated",
"anonymous": false
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32",
"indexed": false
},
{
"internalType": "bytes32",
"name": "lastMiniblockHash",
"type": "bytes32",
"indexed": false
},
{
"internalType": "uint64",
"name": "lastMiniblockNum",
"type": "uint64",
"indexed": false
},
{
"internalType": "string",
"name": "reason",
"type": "string",
"indexed": false
}
],
"type": "event",
"name": "StreamLastMiniblockUpdateFailed",
"anonymous": false
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32",
"indexed": false
},
{
"internalType": "bytes32",
"name": "lastMiniblockHash",
"type": "bytes32",
"indexed": false
},
{
"internalType": "uint64",
"name": "lastMiniblockNum",
"type": "uint64",
"indexed": false
},
{
"internalType": "bool",
"name": "isSealed",
"type": "bool",
"indexed": false
}
],
"type": "event",
"name": "StreamLastMiniblockUpdated",
"anonymous": false
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32",
"indexed": false
},
{
"internalType": "address",
"name": "nodeAddress",
"type": "address",
"indexed": false
},
{
"internalType": "bool",
"name": "isAdded",
"type": "bool",
"indexed": false
}
],
"type": "event",
"name": "StreamPlacementUpdated",
"anonymous": false
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "genesisMiniblockHash",
"type": "bytes32"
},
{
"internalType": "struct Stream",
"name": "stream",
"type": "tuple",
"components": [
{
"internalType": "bytes32",
"name": "lastMiniblockHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "lastMiniblockNum",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "reserved0",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "flags",
"type": "uint64"
},
{
"internalType": "address[]",
"name": "nodes",
"type": "address[]"
}
]
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "addStream"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32"
},
{
"internalType": "address[]",
"name": "nodes",
"type": "address[]"
},
{
"internalType": "bytes32",
"name": "genesisMiniblockHash",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "genesisMiniblock",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "allocateStream"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "start",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "stop",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "getPaginatedStreams",
"outputs": [
{
"internalType": "struct StreamWithId[]",
"name": "",
"type": "tuple[]",
"components": [
{
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
},
{
"internalType": "struct Stream",
"name": "stream",
"type": "tuple",
"components": [
{
"internalType": "bytes32",
"name": "lastMiniblockHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "lastMiniblockNum",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "reserved0",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "flags",
"type": "uint64"
},
{
"internalType": "address[]",
"name": "nodes",
"type": "address[]"
}
]
}
]
},
{
"internalType": "bool",
"name": "",
"type": "bool"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "nodeAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "start",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "stop",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "getPaginatedStreamsOnNode",
"outputs": [
{
"internalType": "struct StreamWithId[]",
"name": "streams",
"type": "tuple[]",
"components": [
{
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
},
{
"internalType": "struct Stream",
"name": "stream",
"type": "tuple",
"components": [
{
"internalType": "bytes32",
"name": "lastMiniblockHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "lastMiniblockNum",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "reserved0",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "flags",
"type": "uint64"
},
{
"internalType": "address[]",
"name": "nodes",
"type": "address[]"
}
]
}
]
}
]
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function",
"name": "getStream",
"outputs": [
{
"internalType": "struct Stream",
"name": "stream",
"type": "tuple",
"components": [
{
"internalType": "bytes32",
"name": "lastMiniblockHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "lastMiniblockNum",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "reserved0",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "flags",
"type": "uint64"
},
{
"internalType": "address[]",
"name": "nodes",
"type": "address[]"
}
]
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "getStreamCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "nodeAddress",
"type": "address"
}
],
"stateMutability": "view",
"type": "function",
"name": "getStreamCountOnNode",
"outputs": [
{
"internalType": "uint256",
"name": "count",
"type": "uint256"
}
]
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function",
"name": "getStreamWithGenesis",
"outputs": [
{
"internalType": "struct Stream",
"name": "stream",
"type": "tuple",
"components": [
{
"internalType": "bytes32",
"name": "lastMiniblockHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "lastMiniblockNum",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "reserved0",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "flags",
"type": "uint64"
},
{
"internalType": "address[]",
"name": "nodes",
"type": "address[]"
}
]
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function",
"name": "isStream",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
]
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32"
},
{
"internalType": "address",
"name": "nodeAddress",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "placeStreamOnNode"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32"
},
{
"internalType": "address",
"name": "nodeAddress",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "removeStreamFromNode"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "lastMiniblockHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "lastMiniblockNum",
"type": "uint64"
},
{
"internalType": "bool",
"name": "isSealed",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "setStreamLastMiniblock"
},
{
"inputs": [
{
"internalType": "struct SetMiniblock[]",
"name": "miniblocks",
"type": "tuple[]",
"components": [
{
"internalType": "bytes32",
"name": "streamId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "prevMiniBlockHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "lastMiniblockHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "lastMiniblockNum",
"type": "uint64"
},
{
"internalType": "bool",
"name": "isSealed",
"type": "bool"
}
]
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "setStreamLastMiniblockBatch"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "start",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "stop",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "syncNodesOnStreams"
}
],
"devdoc": {
"kind": "dev",
"methods": {
"addStream(bytes32,bytes32,(bytes32,uint64,uint64,uint64,address[]))": {
"details": "Only callable by registered nodes",
"params": {
"stream": "is the Stream object to be created"
}
},
"allocateStream(bytes32,address[],bytes32,bytes)": {
"details": "Only callable by registered nodes",
"params": {
"genesisMiniblock": "The genesis miniblock data",
"genesisMiniblockHash": "The hash of the genesis miniblock",
"nodes": "The list of nodes to place the stream on",
"streamId": "The ID of the stream to allocate"
}
},
"getPaginatedStreams(uint256,uint256)": {
"details": "Recommended range is 5000 streams to avoid gas limits",
"params": {
"start": "The starting index for pagination",
"stop": "The ending index for pagination, exclusive"
},
"returns": {
"_0": "StreamWithId[] Array of streams with their IDs in the requested range",
"_1": "bool True if this is the last page of results"
}
},
"getPaginatedStreamsOnNode(address,uint256,uint256)": {
"params": {
"nodeAddress": "The address of the node",
"start": "The starting index for pagination",
"stop": "The ending index for pagination, exclusive"
},
"returns": {
"streams": "Array of streams with their IDs in the requested range for the specified node"
}
},
"getStream(bytes32)": {
"params": {
"streamId": "The ID of the stream to get"
},
"returns": {
"stream": "Stream The stream data"
}
},
"getStreamCount()": {
"returns": {
"_0": "uint256 The total number of streams"
}
},
"getStreamCountOnNode(address)": {
"params": {
"nodeAddress": "The address of the node to check"
},
"returns": {
"count": "uint256 The number of streams on the node"
}
},
"getStreamWithGenesis(bytes32)": {
"params": {
"streamId": "The ID of the stream to get"
},
"returns": {
"_1": "bytes32 The genesis miniblock hash",
"_2": "bytes The genesis miniblock data",
"stream": "Stream The stream data"
}
},
"isStream(bytes32)": {
"params": {
"streamId": "The ID of the stream to check"
},
"returns": {
"_0": "bool True if the stream exists, false otherwise"
}
},
"placeStreamOnNode(bytes32,address)": {
"params": {
"nodeAddress": "The address of the node to place the stream on",
"streamId": "The ID of the stream to place"
}
},
"removeStreamFromNode(bytes32,address)": {
"params": {
"nodeAddress": "The address of the node to remove the stream from",
"streamId": "The ID of the stream to remove"
}
},
"setStreamLastMiniblock(bytes32,bytes32,bytes32,uint64,bool)": {
"details": "Only callable by registered nodes",
"params": {
"isSealed": "Whether to mark the stream as sealed",
"lastMiniblockHash": "The hash of the new last miniblock",
"lastMiniblockNum": "The number of the new last miniblock",
"prevMiniblockHash": "The hash of the previous miniblock (currently unused)",
"streamId": "The ID of the stream to update"
}
},
"setStreamLastMiniblockBatch((bytes32,bytes32,bytes32,uint64,bool)[])": {
"details": "Only callable by registered nodesThis function allows updating multiple streams' last miniblock data in a single transaction",
"params": {
"miniblocks": "Array of SetMiniblock structs containing stream IDs and their last miniblock information"
}
},
"syncNodesOnStreams(uint256,uint256)": {
"params": {
"start": "The starting index for pagination",
"stop": "The ending index for pagination, exclusive"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"addStream(bytes32,bytes32,(bytes32,uint64,uint64,uint64,address[]))": {
"notice": "Create a new stream in the registry"
},
"allocateStream(bytes32,address[],bytes32,bytes)": {
"notice": "Allocate a new stream in the registry"
},
"getPaginatedStreams(uint256,uint256)": {
"notice": "Get a paginated list of streams from the registry"
},
"getPaginatedStreamsOnNode(address,uint256,uint256)": {
"notice": "Get a paginated list of streams on a specific node"
},
"getStream(bytes32)": {
"notice": "Get a stream from the registry"
},
"getStreamCount()": {
"notice": "Get the total number of streams in the registry"
},
"getStreamCountOnNode(address)": {
"notice": "Get the number of streams placed on a specific node"
},
"getStreamWithGenesis(bytes32)": {
"notice": "Get a stream and its genesis information from the registry"
},
"isStream(bytes32)": {
"notice": "Check if a stream exists in the registry"
},
"placeStreamOnNode(bytes32,address)": {
"notice": "Place a stream on a specific node"
},
"removeStreamFromNode(bytes32,address)": {
"notice": "Remove a stream from a specific node"
},
"setStreamLastMiniblock(bytes32,bytes32,bytes32,uint64,bool)": {
"notice": "Update the last miniblock information for a stream"
},
"setStreamLastMiniblockBatch((bytes32,bytes32,bytes32,uint64,bool)[])": {
"notice": "Set the last miniblock for multiple streams in a batch operation"
},
"syncNodesOnStreams(uint256,uint256)": {
"notice": "Sync node addresses for streams in a range to `streamIdsByNode` mapping"
}
},
"version": 1
}
},
"settings": {
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
"@prb/math/=node_modules/@prb/math/src/",
"@prb/test/=node_modules/@prb/test/src/",
"@river-build/diamond/=node_modules/@river-build/diamond/",
"@solidity/=node_modules/crypto-lib/src/",
"account-abstraction/=node_modules/account-abstraction/contracts/",
"crypto-lib/=node_modules/crypto-lib/src/",
"ds-test/=node_modules/ds-test/src/",
"forge-std/=node_modules/forge-std/src/",
"hardhat-deploy/=node_modules/hardhat-deploy/",
"solady/=node_modules/solady/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "none",
"appendCBOR": false
},
"compilationTarget": {
"contracts/src/river/registry/facets/stream/StreamRegistry.sol": "StreamRegistry"
},
"evmVersion": "paris",
"libraries": {}
},
"sources": {
"contracts/src/river/registry/facets/stream/IStreamRegistry.sol": {
"keccak256": "0x85011c1cea4c3269a9b885deb0ba61cd07cb81c23ddda95e44300860de08c415",
"urls": [
"bzz-raw://5f251ee7f20a441a7a29c9bd4eeea4679950aaad61bbf04aeff45a7276c5378e",
"dweb:/ipfs/QmefpgU4w2T1vaMixzGX6Rcts2QiodHPrdKyQXW98xQbKR"
],
"license": "MIT"
},
"contracts/src/river/registry/facets/stream/StreamRegistry.sol": {
"keccak256": "0x7c5d2ace5c2e3c0d862fefe95d2941d5d6bdc77f6eee0cb43b1646a002446712",
"urls": [
"bzz-raw://08813c75f7bb2034b9de0375b757ca82ba0f95c561443e81eea43bd8f7b0b2ce",
"dweb:/ipfs/QmPVfjcp5MoguUMhKXUQPyUgEApjvecsGavHjcdDwd7Cx7"
],
"license": "MIT"
},
"contracts/src/river/registry/libraries/RegistryErrors.sol": {
"keccak256": "0x411bd2bca08451c59880f46aa3ce0ac6b20a1cfa8a8836e4ce035fad57bce497",
"urls": [
"bzz-raw://7d8b0fff68a90994db10dd30f26f4f399027295152060b65fadaab76768f6501",
"dweb:/ipfs/QmdJsGe2utFn1ju8YKkZpshVGNgUbfkkZP77LprQ43BcPP"
],
"license": "MIT"
},
"contracts/src/river/registry/libraries/RegistryStorage.sol": {
"keccak256": "0x6746f596f0241c8848bc6811829cc7a2264413ae0d4696dae95dcb0df0302034",
"urls": [
"bzz-raw://4c6315755c549e6c5fa0e88dce5394b26e0886b0f8863077463adfd34f0f16af",
"dweb:/ipfs/QmcgBsAoEMNdkXkTT9AGdd7kcT9DRNLb5sDFiUktFcm6qr"
],
"license": "MIT"
},
"node_modules/@openzeppelin/contracts/utils/structs/EnumerableSet.sol": {
"keccak256": "0x9b161e97b8967d4bc0c08d25741889a30692cdda4b71910bf1b0e315f1962212",
"urls": [
"bzz-raw://821500c39d095eaa25b06f46e65f1d0e97c4c96b39227f79077dee7d9e84051f",
"dweb:/ipfs/QmSTeGorKzSWF6HAmxo32uCZiEuKNvreQdUiX1AaYtUMTz"
],
"license": "MIT"
},
"node_modules/solady/src/utils/FixedPointMathLib.sol": {
"keccak256": "0x08ab121a1074161b4470c48dadcd6ed71eeb33db1adbefe514771e03cf380fba",
"urls": [
"bzz-raw://b8d7a3b1dd013ee2b1f56d55b58f1d0b09ae3bcbe630e5a122f8998072c1ecad",
"dweb:/ipfs/QmNRnBQ6me4s6xDeejdHRjn9Drb5MgcRtfwit9HbYhkJkk"
],
"license": "MIT"
}
},
"version": 1
}