@river-build/generated
Version:
## How to generate contract types
596 lines • 16.7 kB
JSON
{
"compiler": {
"version": "0.8.24+commit.e11b9ed9"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
}
],
"type": "error",
"name": "CheckOperationsLimitReaced"
},
{
"inputs": [],
"type": "error",
"name": "Entitlement__InvalidValue"
},
{
"inputs": [],
"type": "error",
"name": "Entitlement__NotAllowed"
},
{
"inputs": [],
"type": "error",
"name": "Entitlement__NotMember"
},
{
"inputs": [],
"type": "error",
"name": "Entitlement__ValueAlreadyExists"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "operationIndex",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "checkOperationsLength",
"type": "uint8"
}
],
"type": "error",
"name": "InvalidCheckOperationIndex"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "leftOperationIndex",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "currentOperationIndex",
"type": "uint8"
}
],
"type": "error",
"name": "InvalidLeftOperationIndex"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "operationIndex",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "logicalOperationsLength",
"type": "uint8"
}
],
"type": "error",
"name": "InvalidLogicalOperationIndex"
},
{
"inputs": [
{
"internalType": "enum IRuleEntitlementBase.CombinedOperationType",
"name": "opType",
"type": "uint8"
}
],
"type": "error",
"name": "InvalidOperationType"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "rightOperationIndex",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "currentOperationIndex",
"type": "uint8"
}
],
"type": "error",
"name": "InvalidRightOperationIndex"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
}
],
"type": "error",
"name": "LogicalOperationLimitReached"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
}
],
"type": "error",
"name": "OperationsLimitReached"
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "description",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
]
},
{
"inputs": [
{
"internalType": "struct IRuleEntitlementBase.RuleData",
"name": "data",
"type": "tuple",
"components": [
{
"internalType": "struct IRuleEntitlementBase.Operation[]",
"name": "operations",
"type": "tuple[]",
"components": [
{
"internalType": "enum IRuleEntitlementBase.CombinedOperationType",
"name": "opType",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "index",
"type": "uint8"
}
]
},
{
"internalType": "struct IRuleEntitlementBase.CheckOperation[]",
"name": "checkOperations",
"type": "tuple[]",
"components": [
{
"internalType": "enum IRuleEntitlementBase.CheckOperationType",
"name": "opType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
},
{
"internalType": "address",
"name": "contractAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "threshold",
"type": "uint256"
}
]
},
{
"internalType": "struct IRuleEntitlementBase.LogicalOperation[]",
"name": "logicalOperations",
"type": "tuple[]",
"components": [
{
"internalType": "enum IRuleEntitlementBase.LogicalOperationType",
"name": "logOpType",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "leftOperationIndex",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "rightOperationIndex",
"type": "uint8"
}
]
}
]
}
],
"stateMutability": "pure",
"type": "function",
"name": "encodeRuleData",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roleId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "getEntitlementDataByRoleId",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
]
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roleId",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"name": "getRuleData",
"outputs": [
{
"internalType": "struct IRuleEntitlementBase.RuleData",
"name": "data",
"type": "tuple",
"components": [
{
"internalType": "struct IRuleEntitlementBase.Operation[]",
"name": "operations",
"type": "tuple[]",
"components": [
{
"internalType": "enum IRuleEntitlementBase.CombinedOperationType",
"name": "opType",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "index",
"type": "uint8"
}
]
},
{
"internalType": "struct IRuleEntitlementBase.CheckOperation[]",
"name": "checkOperations",
"type": "tuple[]",
"components": [
{
"internalType": "enum IRuleEntitlementBase.CheckOperationType",
"name": "opType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
},
{
"internalType": "address",
"name": "contractAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "threshold",
"type": "uint256"
}
]
},
{
"internalType": "struct IRuleEntitlementBase.LogicalOperation[]",
"name": "logicalOperations",
"type": "tuple[]",
"components": [
{
"internalType": "enum IRuleEntitlementBase.LogicalOperationType",
"name": "logOpType",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "leftOperationIndex",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "rightOperationIndex",
"type": "uint8"
}
]
}
]
}
]
},
{
"inputs": [
{
"internalType": "address",
"name": "space",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "initialize"
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "isCrosschain",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
]
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "channelId",
"type": "bytes32"
},
{
"internalType": "address[]",
"name": "user",
"type": "address[]"
},
{
"internalType": "bytes32",
"name": "permission",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function",
"name": "isEntitled",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "moduleType",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
]
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roleId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "removeEntitlement"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roleId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "entitlementData",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "setEntitlement"
}
],
"devdoc": {
"kind": "dev",
"methods": {
"encodeRuleData(((uint8,uint8)[],(uint8,uint256,address,uint256)[],(uint8,uint8,uint8)[]))": {
"params": {
"data": "RuleData struct to encode"
},
"returns": {
"_0": "Encoded bytes of the RuleData struct"
}
},
"getEntitlementDataByRoleId(uint256)": {
"params": {
"roleId": "the roleId to fetch the entitlement data for"
},
"returns": {
"_0": "entitlementData array for the role"
}
},
"getRuleData(uint256)": {
"params": {
"roleId": "Role ID"
},
"returns": {
"data": "RuleData struct"
}
},
"isCrosschain()": {
"returns": {
"_0": "whether this entitlement will require crosschain evaluation"
}
},
"isEntitled(bytes32,address[],bytes32)": {
"params": {
"channelId": "id of the channel to check, if empty, checks space",
"permission": "the permission to check",
"user": "address of the user to check"
},
"returns": {
"_0": "whether the user is entitled to the permission"
}
},
"removeEntitlement(uint256)": {
"params": {
"roleId": "id of the role to remove"
}
},
"setEntitlement(uint256,bytes)": {
"params": {
"entitlementData": "abi encoded array of data necessary to set the entitlement",
"roleId": "id of the role to gate"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"description()": {
"notice": "The description of the entitlement module"
},
"encodeRuleData(((uint8,uint8)[],(uint8,uint256,address,uint256)[],(uint8,uint8,uint8)[]))": {
"notice": "Encodes the RuleData struct into bytes"
},
"getEntitlementDataByRoleId(uint256)": {
"notice": "fetches the entitlement data for a roleId"
},
"getRuleData(uint256)": {
"notice": "Decodes the RuleData struct from bytes"
},
"initialize(address)": {
"notice": "initializes the entitlement module"
},
"isCrosschain()": {
"notice": "some entitlements require cross chain evaluation and may not be executed directly from other contracts"
},
"isEntitled(bytes32,address[],bytes32)": {
"notice": "checks whether a user is has a given permission for a channel or a space"
},
"moduleType()": {
"notice": "The type of the entitlement module"
},
"name()": {
"notice": "The name of the entitlement module"
},
"removeEntitlement(uint256)": {
"notice": "removes an entitlement"
},
"setEntitlement(uint256,bytes)": {
"notice": "sets a new entitlement"
}
},
"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/spaces/entitlements/rule/IRuleEntitlement.sol": "IRuleEntitlement"
},
"evmVersion": "paris",
"libraries": {}
},
"sources": {
"contracts/src/spaces/entitlements/IEntitlement.sol": {
"keccak256": "0x81712a4b9127000ba341966d99395917dcb4b1305eadeddd1e1ad4e562587fdd",
"urls": [
"bzz-raw://df0fcc9d7ed7489786684f5fa8375b277146969021f96f6a9feb81cb39176eca",
"dweb:/ipfs/QmbxXXeXe6AzXUL8cSoABMx2E2QbRAK2uJXd8TRnDuKSJ8"
],
"license": "MIT"
},
"contracts/src/spaces/entitlements/rule/IRuleEntitlement.sol": {
"keccak256": "0x362d73e7b5a9626ffb3c76ebd7c41cae6240ce0a8d2ec401df345814a39b303b",
"urls": [
"bzz-raw://c750b186885d1af5cda10755c8443629b270d18b221c1054a7e9344adbea7ce4",
"dweb:/ipfs/QmcwkJjGj8PGy43KRRh2c4ggcjBVD65XDsoq8H5LozTeN2"
],
"license": "MIT"
}
},
"version": 1
}