@wasserstoff/tribes-sdk
Version:
SDK for integrating with Tribes by Astrix platform on any EVM compatible chain
651 lines (650 loc) • 17.9 kB
JSON
[
{
"inputs": [
{
"internalType": "address",
"name": "_tribeController",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AccessControlBadConfirmation",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "bytes32",
"name": "neededRole",
"type": "bytes32"
}
],
"name": "AccessControlUnauthorizedAccount",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
{
"inputs": [],
"name": "DEFAULT_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "address",
"name": "creator",
"type": "address"
},
{
"internalType": "uint256",
"name": "tribeId",
"type": "uint256"
},
{
"internalType": "string",
"name": "metadata",
"type": "string"
},
{
"internalType": "bool",
"name": "isGated",
"type": "bool"
},
{
"internalType": "address",
"name": "collectibleContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "collectibleId",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isEncrypted",
"type": "bool"
},
{
"internalType": "bytes32",
"name": "encryptionKeyHash",
"type": "bytes32"
},
{
"internalType": "address",
"name": "accessSigner",
"type": "address"
},
{
"internalType": "uint256",
"name": "parentPostId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isDeleted",
"type": "bool"
}
],
"internalType": "struct FeedHelpers.PostData",
"name": "post",
"type": "tuple"
}
],
"name": "addPost",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
},
{
"internalType": "uint256",
"name": "offset",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
}
],
"name": "getFeedForUser",
"outputs": [
{
"internalType": "uint256[]",
"name": "postIds",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "total",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "postId",
"type": "uint256"
}
],
"name": "getPost",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "address",
"name": "creator",
"type": "address"
},
{
"internalType": "uint256",
"name": "tribeId",
"type": "uint256"
},
{
"internalType": "string",
"name": "metadata",
"type": "string"
},
{
"internalType": "bool",
"name": "isGated",
"type": "bool"
},
{
"internalType": "address",
"name": "collectibleContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "collectibleId",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isEncrypted",
"type": "bool"
},
{
"internalType": "bytes32",
"name": "encryptionKeyHash",
"type": "bytes32"
},
{
"internalType": "address",
"name": "accessSigner",
"type": "address"
},
{
"internalType": "uint256",
"name": "parentPostId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isDeleted",
"type": "bool"
}
],
"internalType": "struct FeedHelpers.PostData",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tribeId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "offset",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
}
],
"name": "getPostsByTribe",
"outputs": [
{
"internalType": "uint256[]",
"name": "postIds",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "total",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tribeId",
"type": "uint256"
},
{
"internalType": "address",
"name": "user",
"type": "address"
},
{
"internalType": "uint256",
"name": "offset",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
}
],
"name": "getPostsByTribeAndUser",
"outputs": [
{
"internalType": "uint256[]",
"name": "postIds",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "total",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
},
{
"internalType": "uint256",
"name": "offset",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
}
],
"name": "getPostsByUser",
"outputs": [
{
"internalType": "uint256[]",
"name": "postIds",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "total",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "getRoleAdmin",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "grantRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "hasRole",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "postId",
"type": "uint256"
}
],
"name": "markPostDeleted",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "posts",
"outputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "address",
"name": "creator",
"type": "address"
},
{
"internalType": "uint256",
"name": "tribeId",
"type": "uint256"
},
{
"internalType": "string",
"name": "metadata",
"type": "string"
},
{
"internalType": "bool",
"name": "isGated",
"type": "bool"
},
{
"internalType": "address",
"name": "collectibleContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "collectibleId",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isEncrypted",
"type": "bool"
},
{
"internalType": "bytes32",
"name": "encryptionKeyHash",
"type": "bytes32"
},
{
"internalType": "address",
"name": "accessSigner",
"type": "address"
},
{
"internalType": "uint256",
"name": "parentPostId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isDeleted",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "callerConfirmation",
"type": "address"
}
],
"name": "renounceRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "revokeRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "tribeController",
"outputs": [
{
"internalType": "contract ITribeController",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]