dkg-evm-module
Version:
Smart contracts for OriginTrail V8
913 lines (912 loc) • 18.8 kB
JSON
[
{
"inputs": [
{
"internalType": "address",
"name": "hubAddress",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "string",
"name": "msg",
"type": "string"
}
],
"name": "UnauthorizedAccess",
"type": "error"
},
{
"inputs": [],
"name": "ZeroAddressHub",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "addedTracSpent",
"type": "uint96"
}
],
"name": "addCumulativeTracSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "knowledgeCollectionId",
"type": "bytes32"
}
],
"name": "addSubmittedKnowledgeCollection",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "uint96",
"name": "addedTracSpent",
"type": "uint96"
}
],
"name": "addTotalTracSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "addedUnrewardedTracSpent",
"type": "uint96"
}
],
"name": "addUnrewardedTracSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "address",
"name": "knowledgeCollectionStorageContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "knowledgeCollectionId",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "merkleRoot",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "updateTokenAmount",
"type": "uint96"
}
],
"name": "addUpdatingKnowledgeCollectionState",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "knowledgeCollectionStateId",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "addedUpdateTokenAmount",
"type": "uint96"
}
],
"name": "addUpdatingKnowledgeCollectionUpdateTokenAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "addedcumulativeAwardedToken",
"type": "uint256"
}
],
"name": "addcumulativeAwardedToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
}
],
"name": "decrementTotalSubmittedKnowledgeCollectionsCount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
}
],
"name": "deleteKnowledgeMiner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
}
],
"name": "getCumulativeTracSpent",
"outputs": [
{
"internalType": "uint96",
"name": "",
"type": "uint96"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "addr",
"type": "address"
}
],
"name": "getKnowledgeMinerMetadata",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "addr",
"type": "address"
},
{
"internalType": "uint96",
"name": "totalTracSpent",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "totalSubmittedKnowledgeCollectionsCount",
"type": "uint256"
}
],
"internalType": "struct ParanetLib.KnowledgeMinerMetadata",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
}
],
"name": "getSubmittedKnowledgeCollections",
"outputs": [
{
"internalType": "bytes32[]",
"name": "",
"type": "bytes32[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "start",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "end",
"type": "uint256"
}
],
"name": "getSubmittedKnowledgeCollections",
"outputs": [
{
"internalType": "bytes32[]",
"name": "",
"type": "bytes32[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
}
],
"name": "getTotalSubmittedKnowledgeCollectionsCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
}
],
"name": "getTotalTracSpent",
"outputs": [
{
"internalType": "uint96",
"name": "",
"type": "uint96"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
}
],
"name": "getUnrewardedTracSpent",
"outputs": [
{
"internalType": "uint96",
"name": "",
"type": "uint96"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
}
],
"name": "getUpdatingKnowledgeCollectionStates",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "knowledgeCollectionStorageContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "knowledgeCollectionId",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "merkleRoot",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "updateTokenAmount",
"type": "uint96"
}
],
"internalType": "struct ParanetLib.UpdatingKnowledgeCollectionState[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "start",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "end",
"type": "uint256"
}
],
"name": "getUpdatingKnowledgeCollectionStates",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "knowledgeCollectionStorageContract",
"type": "address"
},
{
"internalType": "uint256",
"name": "knowledgeCollectionId",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "merkleRoot",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "updateTokenAmount",
"type": "uint96"
}
],
"internalType": "struct ParanetLib.UpdatingKnowledgeCollectionState[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
}
],
"name": "getcumulativeAwardedToken",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "hub",
"outputs": [
{
"internalType": "contract Hub",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
}
],
"name": "incrementTotalSubmittedKnowledgeCollectionsCount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
}
],
"name": "knowledgeMinerExists",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "paranetsRegistry",
"outputs": [
{
"internalType": "contract ParanetsRegistry",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
}
],
"name": "registerKnowledgeMiner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "knowledgeCollectionId",
"type": "bytes32"
}
],
"name": "removeSubmittedKnowledgeCollection",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "cumulativeTracSpent",
"type": "uint96"
}
],
"name": "setCumulativeTracSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "uint256",
"name": "totalSubmittedKnowledgeCollectionsCount",
"type": "uint256"
}
],
"name": "setTotalSubmittedKnowledgeCollectionsCount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "uint96",
"name": "totalTracSpent",
"type": "uint96"
}
],
"name": "setTotalTracSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "unrewardedTracSpent",
"type": "uint96"
}
],
"name": "setUnrewardedTracSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "knowledgeCollectionStateId",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "updateTokenAmount",
"type": "uint96"
}
],
"name": "setUpdatingKnowledgeCollectionUpdateTokenAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "cumulativeAwardedToken",
"type": "uint256"
}
],
"name": "setcumulativeAwardedToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "subtractedTracSpent",
"type": "uint96"
}
],
"name": "subCumulativeTracSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "uint96",
"name": "subtractedTracSpent",
"type": "uint96"
}
],
"name": "subTotalTracSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "subtractedUnrewardedTracSpent",
"type": "uint96"
}
],
"name": "subUnrewardedTracSpent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "knowledgeCollectionStateId",
"type": "bytes32"
},
{
"internalType": "uint96",
"name": "subtractedUpdateTokenAmount",
"type": "uint96"
}
],
"name": "subUpdatingKnowledgeCollectionUpdateTokenAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "miner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "paranetId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "subtractedcumulativeAwardedToken",
"type": "uint256"
}
],
"name": "subcumulativeAwardedToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "pure",
"type": "function"
}
]