{ "contractName": "ReputationMiningCycle", "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "_newHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "_nLeaves", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "_jrh", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "_firstDisagreeIdx", "type": "uint256" } ], "name": "BinarySearchConfirmed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "_newHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "_nLeaves", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "_jrh", "type": "bytes32" } ], "name": "BinarySearchStep", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "_newHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "_nLeaves", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "_jrh", "type": "bytes32" } ], "name": "ChallengeCompleted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "_newHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "_nLeaves", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "_jrh", "type": "bytes32" } ], "name": "HashInvalidated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "_newHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "_nLeaves", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "_jrh", "type": "bytes32" } ], "name": "JustificationRootHashConfirmed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "authority", "type": "address" } ], "name": "LogSetAuthority", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" } ], "name": "LogSetOwner", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "previousNewReputationUID", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_disagreeStateReputationUID", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "_existingUID", "type": "bool" } ], "name": "ProveUIDSuccess", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "int256", "name": "_agreeStateReputationValue", "type": "int256" }, { "indexed": false, "internalType": "int256", "name": "_disagreeStateReputationValue", "type": "int256" }, { "indexed": false, "internalType": "int256", "name": "_originReputationValue", "type": "int256" } ], "name": "ProveValueSuccess", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "_miner", "type": "address" }, { "indexed": false, "internalType": "bytes32", "name": "_newHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "_nLeaves", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "_jrh", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "_entryIndex", "type": "uint256" } ], "name": "ReputationRootHashSubmitted", "type": "event" }, { "inputs": [], "name": "authority", "outputs": [ { "internalType": "contract DSAuthority", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_nLeaves", "type": "uint256" }, { "internalType": "uint256", "name": "_leaf", "type": "uint256" } ], "name": "expectedBranchMask", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "contract DSAuthority", "name": "authority_", "type": "address" } ], "name": "setAuthority", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner_", "type": "address" } ], "name": "setOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_tokenLockingAddress", "type": "address" }, { "internalType": "address", "name": "_clnyTokenAddress", "type": "address" } ], "name": "initialise", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getMinStake", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "getMiningWindowDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_submitter", "type": "address" }, { "internalType": "uint256", "name": "_entryIndex", "type": "uint256" }, { "internalType": "bytes32", "name": "_newHash", "type": "bytes32" } ], "name": "getEntryHash", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "getNUniqueSubmittedHashes", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_hash", "type": "bytes32" }, { "internalType": "uint256", "name": "_nLeaves", "type": "uint256" }, { "internalType": "bytes32", "name": "_jrh", "type": "bytes32" } ], "name": "getNSubmissionsForHash", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getNInvalidatedHashes", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_hash", "type": "bytes32" }, { "internalType": "uint256", "name": "_nLeaves", "type": "uint256" }, { "internalType": "bytes32", "name": "_jrh", "type": "bytes32" }, { "internalType": "uint256", "name": "_index", "type": "uint256" } ], "name": "getSubmissionUser", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "resetWindow", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_round", "type": "uint256" } ], "name": "challengeRoundComplete", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_newHash", "type": "bytes32" }, { "internalType": "uint256", "name": "_nLeaves", "type": "uint256" }, { "internalType": "bytes32", "name": "_jrh", "type": "bytes32" }, { "internalType": "uint256", "name": "_entryIndex", "type": "uint256" } ], "name": "submitRootHash", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_roundNumber", "type": "uint256" } ], "name": "confirmNewHash", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_round", "type": "uint256" }, { "internalType": "uint256", "name": "_idx", "type": "uint256" } ], "name": "invalidateHash", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_round", "type": "uint256" }, { "internalType": "uint256", "name": "_index", "type": "uint256" }, { "internalType": "bytes32[]", "name": "_siblings1", "type": "bytes32[]" }, { "internalType": "bytes32[]", "name": "_siblings2", "type": "bytes32[]" } ], "name": "confirmJustificationRootHash", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "int256", "name": "_amount", "type": "int256" }, { "internalType": "uint256", "name": "_skillId", "type": "uint256" }, { "internalType": "address", "name": "_colonyAddress", "type": "address" }, { "internalType": "uint128", "name": "_nParents", "type": "uint128" }, { "internalType": "uint128", "name": "_nChildren", "type": "uint128" } ], "name": "appendReputationUpdateLog", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getReputationUpdateLogLength", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "getReputationUpdateLogEntry", "outputs": [ { "components": [ { "internalType": "address", "name": "user", "type": "address" }, { "internalType": "int256", "name": "amount", "type": "int256" }, { "internalType": "uint256", "name": "skillId", "type": "uint256" }, { "internalType": "address", "name": "colony", "type": "address" }, { "internalType": "uint128", "name": "nUpdates", "type": "uint128" }, { "internalType": "uint128", "name": "nPreviousUpdates", "type": "uint128" } ], "internalType": "struct ReputationMiningCycleDataTypes.ReputationLogEntry", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_user", "type": "address" } ], "name": "getReputationHashSubmission", "outputs": [ { "components": [ { "internalType": "bytes32", "name": "proposedNewRootHash", "type": "bytes32" }, { "internalType": "uint256", "name": "nLeaves", "type": "uint256" }, { "internalType": "bytes32", "name": "jrh", "type": "bytes32" }, { "internalType": "uint256", "name": "jrhNLeaves", "type": "uint256" } ], "internalType": "struct ReputationMiningCycleDataTypes.Submission", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_miner", "type": "address" }, { "internalType": "uint256", "name": "_index", "type": "uint256" } ], "name": "minerSubmittedEntryIndex", "outputs": [ { "internalType": "bool", "name": "result", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_round", "type": "uint256" } ], "name": "getDisputeRound", "outputs": [ { "components": [ { "internalType": "address", "name": "firstSubmitter", "type": "address" }, { "internalType": "uint256", "name": "lastResponseTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "challengeStepCompleted", "type": "uint256" }, { "internalType": "bytes32", "name": "intermediateReputationHash", "type": "bytes32" }, { "internalType": "uint256", "name": "intermediateReputationNLeaves", "type": "uint256" }, { "internalType": "uint256", "name": "lowerBound", "type": "uint256" }, { "internalType": "uint256", "name": "upperBound", "type": "uint256" }, { "internalType": "bytes32", "name": "targetHashDuringSearch", "type": "bytes32" }, { "internalType": "bytes32", "name": "hash1", "type": "bytes32" }, { "internalType": "bytes32", "name": "hash2", "type": "bytes32" } ], "internalType": "struct ReputationMiningCycleDataTypes.DisputedEntry[]", "name": "", "type": "tuple[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "_stakers", "type": "address[]" }, { "internalType": "uint256[]", "name": "_weights", "type": "uint256[]" }, { "internalType": "address", "name": "_metaColonyAddress", "type": "address" }, { "internalType": "uint256", "name": "_reward", "type": "uint256" }, { "internalType": "uint256", "name": "_miningSkillId", "type": "uint256" } ], "name": "rewardStakersWithReputation", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getReputationMiningWindowOpenTimestamp", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getDisputeRewardSize", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_user", "type": "address" } ], "name": "userInvolvedInMiningCycle", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "enum ReputationMiningCycleDataTypes.DisputeStages", "name": "_stage", "type": "uint8" }, { "internalType": "uint256", "name": "_since", "type": "uint256" } ], "name": "getResponsePossible", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" } ], "devdoc": { "kind": "dev", "methods": { "initialise(address,address)": { "details": "This will only be called once, by ColonyNetwork, in the same transaction that deploys this contract" } }, "version": 1 }, "userdoc": { "events": { "ProveUIDSuccess(uint256,uint256,bool)": { "notice": "Event logged when a reputation UID is proven to be correct in a challenge" }, "ProveValueSuccess(int256,int256,int256)": { "notice": "Event logged when a reputation value is proven to be correct in a challenge" } }, "kind": "user", "methods": { "getNInvalidatedHashes()": { "notice": "Get the number of hashes that have been invalidated this mining cycle" }, "getNUniqueSubmittedHashes()": { "notice": "Get the number of hashes that have been submitted this mining cycle" }, "getReputationMiningWindowOpenTimestamp()": { "notice": "Get the timestamp that the current reputation mining window opened" }, "initialise(address,address)": { "notice": "Initialise this reputation mining cycle." } }, "version": 1 } }