diff --git a/abi/AragonCourt.json b/abi/AragonCourt.json index 775c902..ccf6356 100644 --- a/abi/AragonCourt.json +++ b/abi/AragonCourt.json @@ -1,596 +1,523 @@ [ { - "constant": true, - "inputs": [], - "name": "getCurrentTermId", - "outputs": [{ "name": "", "type": "uint64" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "uint64", "name": "" }], + "name": "getCurrentTermId", + "inputs": [], + "constant": true }, { - "constant": false, - "inputs": [{ "name": "_owner", "type": "address" }], - "name": "setOwner", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [{ "type": "address", "name": "" }], + "name": "getVoting", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getVoting", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "uint64", "name": "" }], + "name": "getTermDuration", + "inputs": [], + "constant": true }, { - "constant": false, + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "setModules", "inputs": [ - { "name": "_disputeId", "type": "uint256" }, - { "name": "_state", "type": "uint8" } + { "type": "bytes32[]", "name": "_ids" }, + { "type": "address[]", "name": "_addresses" } ], - "name": "decideDispute", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "constant": false }, { - "constant": true, - "inputs": [], - "name": "getTermDuration", - "outputs": [{ "name": "", "type": "uint64" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "bool", "name": "" }], + "name": "areWithdrawalsAllowedFor", + "inputs": [{ "type": "address", "name": "_holder" }], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getTreasury", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "getTreasury", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getSubscriptions", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "getSubscriptions", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getFundsGovernor", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "getFundsGovernor", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getModulesGovernor", - "outputs": [{ "name": "", "type": "address" }], + "type": "function", + "stateMutability": "nonpayable", "payable": false, - "stateMutability": "view", - "type": "function" + "outputs": [{ "type": "uint64", "name": "" }], + "name": "ensureCurrentTerm", + "inputs": [], + "constant": false }, { - "constant": false, - "inputs": [{ "name": "_newFeesUpdater", "type": "address" }], - "name": "changeFeesUpdater", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [{ "type": "address", "name": "" }], + "name": "getModulesGovernor", + "inputs": [], + "constant": true }, { - "constant": false, - "inputs": [ - { "name": "_id", "type": "bytes32" }, - { "name": "_addr", "type": "address" } - ], - "name": "setModule", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [{ "type": "uint64", "name": "" }], + "name": "getNeededTermTransitions", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [{ "name": "", "type": "uint256" }], - "name": "disputes", - "outputs": [ - { "name": "subject", "type": "address" }, - { "name": "state", "type": "uint8" } - ], + "type": "function", + "stateMutability": "nonpayable", "payable": false, - "stateMutability": "view", - "type": "function" + "outputs": [], + "name": "changeFeesUpdater", + "inputs": [{ "type": "address", "name": "_newFeesUpdater" }], + "constant": false }, { - "constant": false, + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "setModule", "inputs": [ - { "name": "_subject", "type": "address" }, - { "name": "_disputeId", "type": "uint256" }, - { "name": "_submitter", "type": "address" }, - { "name": "_evidence", "type": "bytes" } + { "type": "bytes32", "name": "_id" }, + { "type": "address", "name": "_addr" } ], - "name": "submitEvidence", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "constant": false }, { - "constant": true, - "inputs": [], - "name": "feeToken", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "feeAmount", - "outputs": [{ "name": "", "type": "uint256" }], "payable": false, - "stateMutability": "view", - "type": "function" + "outputs": [{ "type": "bytes32", "name": "" }], + "name": "getTermRandomness", + "inputs": [{ "type": "uint64", "name": "_termId" }], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getBrightIdRegister", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_disputeId", "type": "uint256" }], - "name": "draft", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getDisputeFees", "outputs": [ - { "name": "", "type": "address" }, - { "name": "", "type": "address" }, - { "name": "", "type": "uint256" } + { "type": "address", "name": "feeToken" }, + { "type": "uint256", "name": "draftFee" }, + { "type": "uint16", "name": "penaltyPct" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "getDraftConfig", + "inputs": [{ "type": "uint64", "name": "_termId" }], + "constant": true }, { - "constant": true, - "inputs": [{ "name": "_id", "type": "bytes32" }], - "name": "getModule", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "ejectModulesGovernor", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, + "outputs": [{ "type": "uint64", "name": "" }], + "name": "getConfigChangeTermId", "inputs": [], - "name": "owner", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" + "constant": true }, { - "constant": false, - "inputs": [{ "name": "_newFundsGovernor", "type": "address" }], - "name": "changeFundsGovernor", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, + "outputs": [{ "type": "address", "name": "" }], + "name": "getBrightIdRegister", "inputs": [], - "name": "getJurorsRegistry", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getConfigGovernor", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_maxRequestedTransitions", "type": "uint64" }], - "name": "heartbeat", - "outputs": [{ "name": "", "type": "uint64" }], "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [ + { "type": "address", "name": "recipient" }, + { "type": "address", "name": "feeToken" }, + { "type": "uint256", "name": "feeAmount" } + ], + "name": "getDisputeFees", + "inputs": [], + "constant": true }, { - "constant": false, - "inputs": [{ "name": "_termDuration", "type": "uint64" }], - "name": "setTermDuration", - "outputs": [], - "payable": false, + "type": "function", "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getFeesUpdater", - "outputs": [{ "name": "", "type": "address" }], "payable": false, - "stateMutability": "view", - "type": "function" + "outputs": [], + "name": "submitEvidence", + "inputs": [ + { "type": "uint256", "name": "_disputeId" }, + { "type": "address", "name": "_submitter" }, + { "type": "bytes", "name": "_evidence" } + ], + "constant": false }, { - "constant": false, - "inputs": [{ "name": "_disputeId", "type": "uint256" }], - "name": "computeRuling", - "outputs": [ - { "name": "subject", "type": "address" }, - { "name": "finalRuling", "type": "uint8" } - ], - "payable": false, + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "payable": false, + "outputs": [{ "type": "bytes32", "name": "" }], + "name": "ensureCurrentTermRandomness", + "inputs": [], + "constant": false }, { - "constant": false, - "inputs": [ - { "name": "_possibleRulings", "type": "uint256" }, - { "name": "_metadata", "type": "bytes" } - ], - "name": "createDispute", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "payable": false, + "outputs": [], + "name": "closeEvidencePeriod", + "inputs": [{ "type": "uint256", "name": "_disputeId" }], + "constant": false }, { - "constant": false, - "inputs": [ - { "name": "_subject", "type": "address" }, - { "name": "_disputeId", "type": "uint256" } - ], - "name": "closeEvidencePeriod", - "outputs": [], - "payable": false, + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "payable": false, + "outputs": [], + "name": "setAutomaticWithdrawals", + "inputs": [{ "type": "bool", "name": "_allowed" }], + "constant": false }, { - "constant": false, - "inputs": [], - "name": "ejectFundsGovernor", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [{ "type": "uint256", "name": "" }], + "name": "getTermTokenTotalSupply", + "inputs": [{ "type": "uint64", "name": "_termId" }], + "constant": true }, { - "constant": false, - "inputs": [{ "name": "_newModulesGovernor", "type": "address" }], - "name": "changeModulesGovernor", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [{ "type": "address", "name": "" }], + "name": "getModule", + "inputs": [{ "type": "bytes32", "name": "_id" }], + "constant": true }, { - "constant": false, - "inputs": [{ "name": "_newConfigGovernor", "type": "address" }], - "name": "changeConfigGovernor", - "outputs": [], - "payable": false, + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "payable": false, + "outputs": [], + "name": "ejectModulesGovernor", + "inputs": [], + "constant": false }, { - "constant": false, - "inputs": [{ "name": "_disputeId", "type": "uint256" }], - "name": "rule", - "outputs": [ - { "name": "subject", "type": "address" }, - { "name": "ruling", "type": "uint256" } - ], - "payable": false, + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "payable": false, + "outputs": [], + "name": "changeFundsGovernor", + "inputs": [{ "type": "address", "name": "_newFundsGovernor" }], + "constant": false }, { - "constant": true, - "inputs": [], - "name": "getDisputeManager", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "getJurorsRegistry", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [{ "name": "_termId", "type": "uint64" }], - "name": "getConfig", - "outputs": [ - { "name": "_feeToken", "type": "address" }, - { "name": "fees", "type": "uint256[3]" }, - { "name": "maxRulingOptions", "type": "uint8" }, - { "name": "roundParams", "type": "uint64[9]" }, - { "name": "pcts", "type": "uint16[2]" }, - { "name": "appealCollateralParams", "type": "uint256[2]" }, - { "name": "jurorsParams", "type": "uint256[4]" } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "uint256", "name": "" }], + "name": "getMinActiveBalance", + "inputs": [{ "type": "uint64", "name": "_termId" }], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "currentId", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "getConfigGovernor", + "inputs": [], + "constant": true }, { - "constant": false, - "inputs": [{ "name": "_newFirstTermStartTime", "type": "uint64" }], - "name": "delayStartTime", - "outputs": [], - "payable": false, + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "payable": false, + "outputs": [{ "type": "uint64", "name": "" }], + "name": "heartbeat", + "inputs": [{ "type": "uint64", "name": "_maxRequestedTransitions" }], + "constant": false }, { - "constant": true, - "inputs": [{ "name": "_termId", "type": "uint64" }], - "name": "getTerm", - "outputs": [ - { "name": "startTime", "type": "uint64" }, - { "name": "randomnessBN", "type": "uint64" }, - { "name": "randomness", "type": "bytes32" }, - { "name": "celesteTokenTotalSupply", "type": "uint256" } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "getFeesUpdater", + "inputs": [], + "constant": true }, { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "setConfig", "inputs": [ - { "name": "_feeToken", "type": "address" }, - { "name": "_feeAmount", "type": "uint256" } + { "type": "uint64", "name": "_fromTermId" }, + { "type": "address", "name": "_feeToken" }, + { "type": "uint256[3]", "name": "_fees" }, + { "type": "uint8", "name": "_maxRulingOptions" }, + { "type": "uint64[9]", "name": "_roundParams" }, + { "type": "uint16[2]", "name": "_pcts" }, + { "type": "uint256[2]", "name": "_appealCollateralParams" }, + { "type": "uint256[3]", "name": "_jurorsParams" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "constant": false }, { - "anonymous": false, + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [{ "type": "uint256", "name": "" }], + "name": "createDispute", "inputs": [ - { "indexed": false, "name": "previousTermId", "type": "uint64" }, - { "indexed": false, "name": "currentTermId", "type": "uint64" } + { "type": "uint256", "name": "_possibleRulings" }, + { "type": "bytes", "name": "_metadata" } ], - "name": "Heartbeat", - "type": "event" + "constant": false }, { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "previousStartTime", "type": "uint64" }, - { "indexed": false, "name": "currentStartTime", "type": "uint64" } - ], - "name": "StartTimeDelayed", - "type": "event" + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "ejectFundsGovernor", + "inputs": [], + "constant": false }, { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "state", "type": "uint8" } - ], - "name": "DisputeStateChanged", - "type": "event" + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "changeModulesGovernor", + "inputs": [{ "type": "address", "name": "_newModulesGovernor" }], + "constant": false }, { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "submitter", "type": "address" }, - { "indexed": false, "name": "evidence", "type": "bytes" } - ], - "name": "EvidenceSubmitted", - "type": "event" + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "changeConfigGovernor", + "inputs": [{ "type": "address", "name": "_newConfigGovernor" }], + "constant": false }, { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "termId", "type": "uint64" } + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [ + { "type": "address", "name": "subject" }, + { "type": "uint256", "name": "ruling" } ], - "name": "EvidencePeriodClosed", - "type": "event" + "name": "rule", + "inputs": [{ "type": "uint256", "name": "_disputeId" }], + "constant": false }, { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "subject", "type": "address" }, - { "indexed": true, "name": "draftTermId", "type": "uint64" }, - { "indexed": false, "name": "jurorsNumber", "type": "uint64" }, - { "indexed": false, "name": "metadata", "type": "bytes" } - ], - "name": "NewDispute", - "type": "event" + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "getDisputeManager", + "inputs": [], + "constant": true }, { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "roundId", "type": "uint256" }, - { "indexed": true, "name": "juror", "type": "address" } + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [ + { "type": "address", "name": "feeToken" }, + { "type": "uint256[3]", "name": "fees" }, + { "type": "uint8", "name": "maxRulingOptions" }, + { "type": "uint64[9]", "name": "roundParams" }, + { "type": "uint16[2]", "name": "pcts" }, + { "type": "uint256[2]", "name": "appealCollateralParams" }, + { "type": "uint256[3]", "name": "jurorsParams" } ], - "name": "JurorDrafted", - "type": "event" + "name": "getConfig", + "inputs": [{ "type": "uint64", "name": "_termId" }], + "constant": true }, { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "roundId", "type": "uint256" }, - { "indexed": false, "name": "ruling", "type": "uint8" } - ], - "name": "RulingAppealed", - "type": "event" + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "delayStartTime", + "inputs": [{ "type": "uint64", "name": "_newFirstTermStartTime" }], + "constant": false }, { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "roundId", "type": "uint256" }, - { "indexed": true, "name": "draftTermId", "type": "uint64" }, - { "indexed": false, "name": "jurorsNumber", "type": "uint256" } + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [ + { "type": "uint64", "name": "startTime" }, + { "type": "uint64", "name": "randomnessBN" }, + { "type": "bytes32", "name": "randomness" }, + { "type": "uint256", "name": "celesteTokenTotalSupply" } ], - "name": "RulingAppealConfirmed", - "type": "event" + "name": "getTerm", + "inputs": [{ "type": "uint64", "name": "_termId" }], + "constant": true }, { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "ruling", "type": "uint8" } - ], - "name": "RulingComputed", - "type": "event" + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [{ "type": "uint64", "name": "" }], + "name": "getLastEnsuredTermId", + "inputs": [], + "constant": true }, { - "anonymous": false, + "type": "constructor", + "stateMutability": "nonpayable", + "payable": false, "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "roundId", "type": "uint256" }, - { "indexed": false, "name": "collectedTokens", "type": "uint256" } + { "type": "uint64[2]", "name": "_termParams" }, + { "type": "address[4]", "name": "_governors" }, + { "type": "address", "name": "_feeToken" }, + { "type": "uint256[3]", "name": "_fees" }, + { "type": "uint8", "name": "_maxRulingOptions" }, + { "type": "uint64[9]", "name": "_roundParams" }, + { "type": "uint16[2]", "name": "_pcts" }, + { "type": "uint256[2]", "name": "_appealCollateralParams" }, + { "type": "uint256[3]", "name": "_jurorsParams" } + ] + }, + { + "type": "event", + "name": "ModuleSet", + "inputs": [ + { "type": "bytes32", "name": "id", "indexed": false }, + { "type": "address", "name": "addr", "indexed": false } ], - "name": "PenaltiesSettled", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "FundsGovernorChanged", "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "roundId", "type": "uint256" }, - { "indexed": false, "name": "juror", "type": "address" }, - { "indexed": false, "name": "tokens", "type": "uint256" }, - { "indexed": false, "name": "fees", "type": "uint256" } + { "type": "address", "name": "previousGovernor", "indexed": false }, + { "type": "address", "name": "currentGovernor", "indexed": false } ], - "name": "RewardSettled", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "ConfigGovernorChanged", "inputs": [ - { "indexed": true, "name": "disputeId", "type": "uint256" }, - { "indexed": true, "name": "roundId", "type": "uint256" } + { "type": "address", "name": "previousGovernor", "indexed": false }, + { "type": "address", "name": "currentGovernor", "indexed": false } ], - "name": "AppealDepositSettled", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "FeesUpdaterChanged", "inputs": [ - { - "indexed": false, - "name": "previousMaxJurorsPerDraftBatch", - "type": "uint64" - }, - { - "indexed": false, - "name": "currentMaxJurorsPerDraftBatch", - "type": "uint64" - } + { "type": "address", "name": "previousFeesUpdater", "indexed": false }, + { "type": "address", "name": "currentFeesUpdater", "indexed": false } ], - "name": "MaxJurorsPerDraftBatchChanged", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "ModulesGovernorChanged", "inputs": [ - { "indexed": false, "name": "id", "type": "bytes32" }, - { "indexed": false, "name": "addr", "type": "address" } + { "type": "address", "name": "previousGovernor", "indexed": false }, + { "type": "address", "name": "currentGovernor", "indexed": false } ], - "name": "ModuleSet", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "NewConfig", "inputs": [ - { "indexed": false, "name": "previousGovernor", "type": "address" }, - { "indexed": false, "name": "currentGovernor", "type": "address" } + { "type": "uint64", "name": "fromTermId", "indexed": false }, + { "type": "uint64", "name": "courtConfigId", "indexed": false } ], - "name": "FundsGovernorChanged", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "AutomaticWithdrawalsAllowedChanged", "inputs": [ - { "indexed": false, "name": "previousGovernor", "type": "address" }, - { "indexed": false, "name": "currentGovernor", "type": "address" } + { "type": "address", "name": "holder", "indexed": true }, + { "type": "bool", "name": "allowed", "indexed": false } ], - "name": "ConfigGovernorChanged", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "Heartbeat", "inputs": [ - { "indexed": false, "name": "previousFeesUpdater", "type": "address" }, - { "indexed": false, "name": "currentFeesUpdater", "type": "address" } + { "type": "uint64", "name": "previousTermId", "indexed": false }, + { "type": "uint64", "name": "currentTermId", "indexed": false } ], - "name": "FeesUpdaterChanged", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "StartTimeDelayed", "inputs": [ - { "indexed": false, "name": "previousGovernor", "type": "address" }, - { "indexed": false, "name": "currentGovernor", "type": "address" } + { "type": "uint64", "name": "previousStartTime", "indexed": false }, + { "type": "uint64", "name": "currentStartTime", "indexed": false } ], - "name": "ModulesGovernorChanged", - "type": "event" + "anonymous": false } ] diff --git a/abi/BrightIdRegister.json b/abi/BrightIdRegister.json index 56c1bc2..4272324 100644 --- a/abi/BrightIdRegister.json +++ b/abi/BrightIdRegister.json @@ -1,538 +1,324 @@ [ { - "constant": true, - "inputs": [ - { - "name": "_interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, + "type": "function", "stateMutability": "pure", - "type": "function" + "payable": false, + "outputs": [{ "type": "bool", "name": "" }], + "name": "supportsInterface", + "inputs": [{ "type": "bytes4", "name": "_interfaceId" }], + "constant": true }, { - "constant": false, - "inputs": [ - { - "name": "_addrs", - "type": "address[]" - }, - { - "name": "_timestamps", - "type": "uint256[]" - }, - { - "name": "_v", - "type": "uint8[]" - }, - { - "name": "_r", - "type": "bytes32[]" - }, - { - "name": "_s", - "type": "bytes32[]" - }, - { - "name": "_registerAndCall", - "type": "address" - }, - { - "name": "_functionCallData", - "type": "bytes" - } - ], - "name": "register", - "outputs": [], - "payable": false, + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "payable": false, + "outputs": [], + "name": "register", + "inputs": [ + { "type": "address[]", "name": "_addrs" }, + { "type": "uint256[]", "name": "_timestamps" }, + { "type": "uint8[]", "name": "_v" }, + { "type": "bytes32[]", "name": "_r" }, + { "type": "bytes32[]", "name": "_s" }, + { "type": "address", "name": "_registerAndCall" }, + { "type": "bytes", "name": "_functionCallData" } + ], + "constant": false }, { - "constant": true, - "inputs": [], - "name": "hasInitialized", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "bool", "name": "" }], + "name": "hasInitialized", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "userRegistrations", + "type": "function", + "stateMutability": "view", + "payable": false, "outputs": [ - { - "name": "uniqueUserId", - "type": "address" - }, - { - "name": "registerTime", - "type": "uint256" - }, - { - "name": "addressVoid", - "type": "bool" - } + { "type": "address", "name": "uniqueUserId" }, + { "type": "uint256", "name": "registerTime" }, + { "type": "bool", "name": "addressVoid" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "userRegistrations", + "inputs": [{ "type": "address", "name": "" }], + "constant": true }, { - "constant": true, - "inputs": [ - { - "name": "_script", - "type": "bytes" - } - ], - "name": "getEVMScriptExecutor", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "uint256", "name": "" }], + "name": "requiredVerifications", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getRecoveryVault", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "getEVMScriptExecutor", + "inputs": [{ "type": "bytes", "name": "_script" }], + "constant": true }, { - "constant": false, - "inputs": [ - { - "name": "_verificationTimestampVariance", - "type": "uint256" - } - ], - "name": "setVerificationTimestampVariance", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [{ "type": "address", "name": "" }], + "name": "getRecoveryVault", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "brightIdContext", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], + "type": "function", + "stateMutability": "nonpayable", "payable": false, - "stateMutability": "view", - "type": "function" + "outputs": [], + "name": "setVerificationTimestampVariance", + "inputs": [{ "type": "uint256", "name": "_verificationTimestampVariance" }], + "constant": false }, { - "constant": true, - "inputs": [], - "name": "UPDATE_SETTINGS_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "bytes32", "name": "" }], + "name": "brightIdContext", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [ - { - "name": "_brightIdUser", - "type": "address" - } - ], - "name": "hasUniqueUserId", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "bytes32", "name": "" }], + "name": "UPDATE_SETTINGS_ROLE", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "brightIdVerifiers", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "bool", "name": "" }], + "name": "hasUniqueUserId", + "inputs": [{ "type": "address", "name": "_brightIdUser" }], + "constant": true }, { - "constant": false, - "inputs": [ - { - "name": "_registrationPeriod", - "type": "uint256" - } - ], - "name": "setRegistrationPeriod", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [{ "type": "address", "name": "" }], + "name": "brightIdVerifiers", + "inputs": [{ "type": "uint256", "name": "" }], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "registrationPeriod", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "uint256", "name": "" }], + "name": "MAX_BRIGHTID_VERIFIERS", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getBrightIdVerifiers", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], + "type": "function", + "stateMutability": "nonpayable", "payable": false, - "stateMutability": "view", - "type": "function" + "outputs": [], + "name": "setRegistrationPeriod", + "inputs": [{ "type": "uint256", "name": "_registrationPeriod" }], + "constant": false }, { - "constant": true, - "inputs": [ - { - "name": "token", - "type": "address" - } - ], - "name": "allowRecoverability", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "uint256", "name": "" }], + "name": "registrationPeriod", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "appId", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address[]", "name": "" }], + "name": "getBrightIdVerifiers", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getInitializationBlock", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "bool", "name": "" }], + "name": "allowRecoverability", + "inputs": [{ "type": "address", "name": "token" }], + "constant": true }, { - "constant": false, - "inputs": [ - { - "name": "_brightIdContext", - "type": "bytes32" - }, - { - "name": "_brightIdVerifiers", - "type": "address[]" - }, - { - "name": "_registrationPeriod", - "type": "uint256" - }, - { - "name": "_verificationTimestampVariance", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [{ "type": "bytes32", "name": "" }], + "name": "appId", + "inputs": [], + "constant": true }, { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - } - ], - "name": "transferToVault", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, + "outputs": [{ "type": "uint256", "name": "" }], + "name": "getInitializationBlock", + "inputs": [], + "constant": true + }, + { + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "payable": false, + "outputs": [], + "name": "transferToVault", + "inputs": [{ "type": "address", "name": "_token" }], + "constant": false }, { - "constant": true, - "inputs": [ - { - "name": "_sender", - "type": "address" - }, - { - "name": "_role", - "type": "bytes32" - }, - { - "name": "_params", - "type": "uint256[]" - } - ], + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [{ "type": "bool", "name": "" }], "name": "canPerform", - "outputs": [ - { - "name": "", - "type": "bool" - } + "inputs": [ + { "type": "address", "name": "_sender" }, + { "type": "bytes32", "name": "_role" }, + { "type": "uint256[]", "name": "_params" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "constant": true }, { - "constant": true, - "inputs": [], - "name": "getEVMScriptRegistry", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "getEVMScriptRegistry", + "inputs": [], + "constant": true }, { - "constant": false, - "inputs": [ - { - "name": "_brightIdVerifiers", - "type": "address[]" - } - ], - "name": "setBrightIdVerifiers", - "outputs": [], + "type": "function", + "stateMutability": "view", "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "outputs": [{ "type": "bool", "name": "" }], + "name": "isVerified", + "inputs": [{ "type": "address", "name": "_brightIdUser" }], + "constant": true }, { - "constant": true, - "inputs": [ - { - "name": "_brightIdUser", - "type": "address" - } - ], - "name": "isVerified", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "uniqueUserId", + "inputs": [{ "type": "address", "name": "_brightIdUser" }], + "constant": true }, { - "constant": true, - "inputs": [ - { - "name": "_brightIdUser", - "type": "address" - } - ], - "name": "uniqueUserId", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "kernel", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "kernel", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "bool", "name": "" }], + "name": "isPetrified", + "inputs": [], + "constant": true }, { - "constant": true, - "inputs": [], - "name": "isPetrified", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], + "type": "function", + "stateMutability": "nonpayable", "payable": false, - "stateMutability": "view", - "type": "function" + "outputs": [], + "name": "setBrightIdVerifiers", + "inputs": [ + { "type": "address[]", "name": "_brightIdVerifiers" }, + { "type": "uint256", "name": "_requiredVerifications" } + ], + "constant": false }, { - "constant": true, - "inputs": [], - "name": "verificationTimestampVariance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], + "type": "function", + "stateMutability": "view", "payable": false, + "outputs": [{ "type": "uint256", "name": "" }], + "name": "verificationTimestampVariance", + "inputs": [], + "constant": true + }, + { + "type": "function", "stateMutability": "view", - "type": "function" + "payable": false, + "outputs": [{ "type": "uint256", "name": "" }], + "name": "MIN_BRIGHTID_VERIFIERS", + "inputs": [], + "constant": true }, { - "anonymous": false, + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "initialize", "inputs": [ - { - "indexed": false, - "name": "sender", - "type": "address" - } + { "type": "bytes32", "name": "_brightIdContext" }, + { "type": "address[]", "name": "_brightIdVerifiers" }, + { "type": "uint256", "name": "_requiredVerifications" }, + { "type": "uint256", "name": "_registrationPeriod" }, + { "type": "uint256", "name": "_verificationTimestampVariance" } ], + "constant": false + }, + { + "type": "event", "name": "Register", - "type": "event" + "inputs": [{ "type": "address", "name": "sender", "indexed": false }], + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "ScriptResult", "inputs": [ - { - "indexed": true, - "name": "executor", - "type": "address" - }, - { - "indexed": false, - "name": "script", - "type": "bytes" - }, - { - "indexed": false, - "name": "input", - "type": "bytes" - }, - { - "indexed": false, - "name": "returnData", - "type": "bytes" - } + { "type": "address", "name": "executor", "indexed": true }, + { "type": "bytes", "name": "script", "indexed": false }, + { "type": "bytes", "name": "input", "indexed": false }, + { "type": "bytes", "name": "returnData", "indexed": false } ], - "name": "ScriptResult", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "RecoverToVault", "inputs": [ - { - "indexed": true, - "name": "vault", - "type": "address" - }, - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - } + { "type": "address", "name": "vault", "indexed": true }, + { "type": "address", "name": "token", "indexed": true }, + { "type": "uint256", "name": "amount", "indexed": false } ], - "name": "RecoverToVault", - "type": "event" + "anonymous": false } -] \ No newline at end of file +] diff --git a/abi/CourtSubscriptions.json b/abi/CourtSubscriptions.json index 657ae51..29120f0 100644 --- a/abi/CourtSubscriptions.json +++ b/abi/CourtSubscriptions.json @@ -1,327 +1 @@ -[ - { - "constant": true, - "inputs": [], - "name": "periodPercentageYield", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCurrentPeriod", - "outputs": [ - { - "name": "periodBalanceCheckpoint", - "type": "uint64" - }, - { - "name": "feeToken", - "type": "address" - }, - { - "name": "totalActiveBalance", - "type": "uint256" - }, - { - "name": "donatedFees", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_feeToken", - "type": "address" - } - ], - "name": "setFeeToken", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_juror", - "type": "address" - } - ], - "name": "getJurorShare", - "outputs": [ - { - "name": "feeToken", - "type": "address" - }, - { - "name": "jurorShare", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_token", - "type": "address" - }, - { - "name": "_to", - "type": "address" - } - ], - "name": "recoverFunds", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getController", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_periodPercentageYield", - "type": "uint256" - } - ], - "name": "setPeriodPercentageYield", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCurrentPeriodId", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_periodId", - "type": "uint256" - } - ], - "name": "getPeriod", - "outputs": [ - { - "name": "periodBalanceCheckpoint", - "type": "uint64" - }, - { - "name": "feeToken", - "type": "address" - }, - { - "name": "totalActiveBalance", - "type": "uint256" - }, - { - "name": "donatedFees", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "currentFeeToken", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "periodDuration", - "outputs": [ - { - "name": "", - "type": "uint64" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_juror", - "type": "address" - } - ], - "name": "hasJurorClaimed", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "claimFees", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "name": "_controller", - "type": "address" - }, - { - "name": "_periodDuration", - "type": "uint64" - }, - { - "name": "_feeToken", - "type": "address" - }, - { - "name": "_periodPercentageYield", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "juror", - "type": "address" - }, - { - "indexed": true, - "name": "periodId", - "type": "uint256" - }, - { - "indexed": false, - "name": "jurorShare", - "type": "uint256" - } - ], - "name": "FeesClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "previousFeeToken", - "type": "address" - }, - { - "indexed": false, - "name": "currentFeeToken", - "type": "address" - } - ], - "name": "FeeTokenChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "previousYield", - "type": "uint256" - }, - { - "indexed": false, - "name": "currenetYield", - "type": "uint256" - } - ], - "name": "PeriodPercentageYieldChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "name": "balance", - "type": "uint256" - } - ], - "name": "RecoverFunds", - "type": "event" - } -] \ No newline at end of file +[{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"periodPercentageYield","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint64","name":"periodBalanceCheckpoint"},{"type":"address","name":"feeToken"},{"type":"uint256","name":"totalActiveBalance"},{"type":"uint256","name":"donatedFees"}],"name":"getCurrentPeriod","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setFeeToken","inputs":[{"type":"address","name":"_feeToken"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"feeToken"},{"type":"uint256","name":"jurorShare"}],"name":"getJurorShare","inputs":[{"type":"address","name":"_juror"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"recoverFunds","inputs":[{"type":"address","name":"_token"},{"type":"address","name":"_to"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"getController","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setPeriodPercentageYield","inputs":[{"type":"uint256","name":"_periodPercentageYield"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"getCurrentPeriodId","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint64","name":"periodBalanceCheckpoint"},{"type":"address","name":"feeToken"},{"type":"uint256","name":"totalActiveBalance"},{"type":"uint256","name":"donatedFees"}],"name":"getPeriod","inputs":[{"type":"uint256","name":"_periodId"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"currentFeeToken","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint64","name":""}],"name":"periodDuration","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"hasJurorClaimed","inputs":[{"type":"address","name":"_juror"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"claimFees","inputs":[],"constant":false},{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"address","name":"_controller"},{"type":"uint64","name":"_periodDuration"},{"type":"address","name":"_feeToken"},{"type":"uint256","name":"_periodPercentageYield"}]},{"type":"event","name":"FeesClaimed","inputs":[{"type":"address","name":"juror","indexed":true},{"type":"uint256","name":"periodId","indexed":true},{"type":"uint256","name":"jurorShare","indexed":false}],"anonymous":false},{"type":"event","name":"FeeTokenChanged","inputs":[{"type":"address","name":"previousFeeToken","indexed":false},{"type":"address","name":"currentFeeToken","indexed":false}],"anonymous":false},{"type":"event","name":"PeriodPercentageYieldChanged","inputs":[{"type":"uint256","name":"previousYield","indexed":false},{"type":"uint256","name":"currenetYield","indexed":false}],"anonymous":false},{"type":"event","name":"RecoverFunds","inputs":[{"type":"address","name":"token","indexed":false},{"type":"address","name":"recipient","indexed":false},{"type":"uint256","name":"balance","indexed":false}],"anonymous":false}] \ No newline at end of file diff --git a/abi/DisputeManager.json b/abi/DisputeManager.json index 6291f32..e3bb452 100644 --- a/abi/DisputeManager.json +++ b/abi/DisputeManager.json @@ -1 +1,450 @@ -[{"constant":false,"inputs":[{"name":"_maxJurorsPerDraftBatch","type":"uint64"}],"name":"setMaxJurorsPerDraftBatch","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_voteId","type":"uint256"},{"name":"_voter","type":"address"}],"name":"ensureCanCommit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_roundId","type":"uint256"},{"name":"_ruling","type":"uint8"}],"name":"createAppeal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_voteId","type":"uint256"}],"name":"ensureCanCommit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_subject","type":"address"},{"name":"_possibleRulings","type":"uint8"},{"name":"_metadata","type":"bytes"}],"name":"createDispute","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_to","type":"address"}],"name":"recoverFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getController","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxJurorsPerDraftBatch","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_roundId","type":"uint256"}],"name":"getRound","outputs":[{"name":"draftTerm","type":"uint64"},{"name":"delayedTerms","type":"uint64"},{"name":"jurorsNumber","type":"uint64"},{"name":"selectedJurors","type":"uint64"},{"name":"jurorFees","type":"uint256"},{"name":"settledPenalties","type":"bool"},{"name":"collectedTokens","type":"uint256"},{"name":"coherentJurors","type":"uint64"},{"name":"state","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_roundId","type":"uint256"},{"name":"_juror","type":"address"}],"name":"getJuror","outputs":[{"name":"weight","type":"uint64"},{"name":"rewarded","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_subject","type":"address"},{"name":"_disputeId","type":"uint256"},{"name":"_submitter","type":"address"},{"name":"_evidence","type":"bytes"}],"name":"submitEvidence","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"}],"name":"draft","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_roundId","type":"uint256"}],"name":"getAppeal","outputs":[{"name":"maker","type":"address"},{"name":"appealedRuling","type":"uint64"},{"name":"taker","type":"address"},{"name":"opposedRuling","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getDisputeFees","outputs":[{"name":"feeToken","type":"address"},{"name":"totalFees","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_roundId","type":"uint256"},{"name":"_juror","type":"address"}],"name":"settleReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_roundId","type":"uint256"},{"name":"_jurorsToSettle","type":"uint256"}],"name":"settlePenalties","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_roundId","type":"uint256"},{"name":"_ruling","type":"uint8"}],"name":"confirmAppeal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"}],"name":"computeRuling","outputs":[{"name":"subject","type":"address"},{"name":"finalRuling","type":"uint8"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_voteId","type":"uint256"},{"name":"_voter","type":"address"}],"name":"ensureCanReveal","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_subject","type":"address"},{"name":"_disputeId","type":"uint256"}],"name":"closeEvidencePeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_roundId","type":"uint256"}],"name":"getNextRoundDetails","outputs":[{"name":"nextRoundStartTerm","type":"uint64"},{"name":"nextRoundJurorsNumber","type":"uint64"},{"name":"newDisputeState","type":"uint8"},{"name":"feeToken","type":"address"},{"name":"totalFees","type":"uint256"},{"name":"jurorFees","type":"uint256"},{"name":"appealDeposit","type":"uint256"},{"name":"confirmAppealDeposit","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_disputeId","type":"uint256"}],"name":"getDispute","outputs":[{"name":"subject","type":"address"},{"name":"possibleRulings","type":"uint8"},{"name":"state","type":"uint8"},{"name":"finalRuling","type":"uint8"},{"name":"lastRoundId","type":"uint256"},{"name":"createTermId","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_disputeId","type":"uint256"},{"name":"_roundId","type":"uint256"}],"name":"settleAppealDeposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_controller","type":"address"},{"name":"_maxJurorsPerDraftBatch","type":"uint64"},{"name":"_skippedDisputes","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"state","type":"uint8"}],"name":"DisputeStateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"submitter","type":"address"},{"indexed":false,"name":"evidence","type":"bytes"}],"name":"EvidenceSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"termId","type":"uint64"}],"name":"EvidencePeriodClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"subject","type":"address"},{"indexed":true,"name":"draftTermId","type":"uint64"},{"indexed":false,"name":"jurorsNumber","type":"uint64"},{"indexed":false,"name":"metadata","type":"bytes"}],"name":"NewDispute","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"roundId","type":"uint256"},{"indexed":true,"name":"juror","type":"address"}],"name":"JurorDrafted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"roundId","type":"uint256"},{"indexed":false,"name":"ruling","type":"uint8"}],"name":"RulingAppealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"roundId","type":"uint256"},{"indexed":true,"name":"draftTermId","type":"uint64"},{"indexed":false,"name":"jurorsNumber","type":"uint256"}],"name":"RulingAppealConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"ruling","type":"uint8"}],"name":"RulingComputed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"roundId","type":"uint256"},{"indexed":false,"name":"collectedTokens","type":"uint256"}],"name":"PenaltiesSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"roundId","type":"uint256"},{"indexed":false,"name":"juror","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"},{"indexed":false,"name":"fees","type":"uint256"}],"name":"RewardSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"disputeId","type":"uint256"},{"indexed":true,"name":"roundId","type":"uint256"}],"name":"AppealDepositSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousMaxJurorsPerDraftBatch","type":"uint64"},{"indexed":false,"name":"currentMaxJurorsPerDraftBatch","type":"uint64"}],"name":"MaxJurorsPerDraftBatchChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"recipient","type":"address"},{"indexed":false,"name":"balance","type":"uint256"}],"name":"RecoverFunds","type":"event"}] +[ + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "setMaxJurorsPerDraftBatch", + "inputs": [{ "type": "uint64", "name": "_maxJurorsPerDraftBatch" }], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "ensureCanCommit", + "inputs": [ + { "type": "uint256", "name": "_voteId" }, + { "type": "address", "name": "_voter" } + ], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "createAppeal", + "inputs": [ + { "type": "uint256", "name": "_disputeId" }, + { "type": "uint256", "name": "_roundId" }, + { "type": "uint8", "name": "_ruling" } + ], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "ensureCanCommit", + "inputs": [{ "type": "uint256", "name": "_voteId" }], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [{ "type": "uint256", "name": "" }], + "name": "createDispute", + "inputs": [ + { "type": "address", "name": "_subject" }, + { "type": "uint8", "name": "_possibleRulings" }, + { "type": "bytes", "name": "_metadata" } + ], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "recoverFunds", + "inputs": [ + { "type": "address", "name": "_token" }, + { "type": "address", "name": "_to" } + ], + "constant": false + }, + { + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [{ "type": "address", "name": "" }], + "name": "getController", + "inputs": [], + "constant": true + }, + { + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [{ "type": "uint64", "name": "" }], + "name": "maxJurorsPerDraftBatch", + "inputs": [], + "constant": true + }, + { + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [ + { "type": "uint64", "name": "draftTerm" }, + { "type": "uint64", "name": "delayedTerms" }, + { "type": "uint64", "name": "jurorsNumber" }, + { "type": "uint64", "name": "selectedJurors" }, + { "type": "uint256", "name": "jurorFees" }, + { "type": "bool", "name": "settledPenalties" }, + { "type": "uint256", "name": "collectedTokens" }, + { "type": "uint64", "name": "coherentJurors" }, + { "type": "uint8", "name": "state" } + ], + "name": "getRound", + "inputs": [ + { "type": "uint256", "name": "_disputeId" }, + { "type": "uint256", "name": "_roundId" } + ], + "constant": true + }, + { + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [ + { "type": "uint64", "name": "weight" }, + { "type": "bool", "name": "rewarded" } + ], + "name": "getJuror", + "inputs": [ + { "type": "uint256", "name": "_disputeId" }, + { "type": "uint256", "name": "_roundId" }, + { "type": "address", "name": "_juror" } + ], + "constant": true + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "submitEvidence", + "inputs": [ + { "type": "address", "name": "_subject" }, + { "type": "uint256", "name": "_disputeId" }, + { "type": "address", "name": "_submitter" }, + { "type": "bytes", "name": "_evidence" } + ], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "draft", + "inputs": [{ "type": "uint256", "name": "_disputeId" }], + "constant": false + }, + { + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [ + { "type": "address", "name": "maker" }, + { "type": "uint64", "name": "appealedRuling" }, + { "type": "address", "name": "taker" }, + { "type": "uint64", "name": "opposedRuling" } + ], + "name": "getAppeal", + "inputs": [ + { "type": "uint256", "name": "_disputeId" }, + { "type": "uint256", "name": "_roundId" } + ], + "constant": true + }, + { + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [ + { "type": "address", "name": "feeToken" }, + { "type": "uint256", "name": "totalFees" } + ], + "name": "getDisputeFees", + "inputs": [], + "constant": true + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "settleReward", + "inputs": [ + { "type": "uint256", "name": "_disputeId" }, + { "type": "uint256", "name": "_roundId" }, + { "type": "address", "name": "_juror" } + ], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "settlePenalties", + "inputs": [ + { "type": "uint256", "name": "_disputeId" }, + { "type": "uint256", "name": "_roundId" }, + { "type": "uint256", "name": "_jurorsToSettle" } + ], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "confirmAppeal", + "inputs": [ + { "type": "uint256", "name": "_disputeId" }, + { "type": "uint256", "name": "_roundId" }, + { "type": "uint8", "name": "_ruling" } + ], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [ + { "type": "address", "name": "subject" }, + { "type": "uint8", "name": "finalRuling" } + ], + "name": "computeRuling", + "inputs": [{ "type": "uint256", "name": "_disputeId" }], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [{ "type": "uint64", "name": "" }], + "name": "ensureCanReveal", + "inputs": [ + { "type": "uint256", "name": "_voteId" }, + { "type": "address", "name": "_voter" } + ], + "constant": false + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "closeEvidencePeriod", + "inputs": [ + { "type": "address", "name": "_subject" }, + { "type": "uint256", "name": "_disputeId" } + ], + "constant": false + }, + { + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [ + { "type": "uint64", "name": "nextRoundStartTerm" }, + { "type": "uint64", "name": "nextRoundJurorsNumber" }, + { "type": "uint8", "name": "newDisputeState" }, + { "type": "address", "name": "feeToken" }, + { "type": "uint256", "name": "totalFees" }, + { "type": "uint256", "name": "jurorFees" }, + { "type": "uint256", "name": "appealDeposit" }, + { "type": "uint256", "name": "confirmAppealDeposit" } + ], + "name": "getNextRoundDetails", + "inputs": [ + { "type": "uint256", "name": "_disputeId" }, + { "type": "uint256", "name": "_roundId" } + ], + "constant": true + }, + { + "type": "function", + "stateMutability": "view", + "payable": false, + "outputs": [ + { "type": "address", "name": "subject" }, + { "type": "uint8", "name": "possibleRulings" }, + { "type": "uint8", "name": "state" }, + { "type": "uint8", "name": "finalRuling" }, + { "type": "uint256", "name": "lastRoundId" }, + { "type": "uint64", "name": "createTermId" } + ], + "name": "getDispute", + "inputs": [{ "type": "uint256", "name": "_disputeId" }], + "constant": true + }, + { + "type": "function", + "stateMutability": "nonpayable", + "payable": false, + "outputs": [], + "name": "settleAppealDeposit", + "inputs": [ + { "type": "uint256", "name": "_disputeId" }, + { "type": "uint256", "name": "_roundId" } + ], + "constant": false + }, + { + "type": "constructor", + "stateMutability": "nonpayable", + "payable": false, + "inputs": [ + { "type": "address", "name": "_controller" }, + { "type": "uint64", "name": "_maxJurorsPerDraftBatch" }, + { "type": "uint256", "name": "_skippedDisputes" } + ] + }, + { + "type": "event", + "name": "DisputeStateChanged", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "uint8", "name": "state", "indexed": true } + ], + "anonymous": false + }, + { + "type": "event", + "name": "EvidenceSubmitted", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "address", "name": "submitter", "indexed": true }, + { "type": "bytes", "name": "evidence", "indexed": false } + ], + "anonymous": false + }, + { + "type": "event", + "name": "EvidencePeriodClosed", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "uint64", "name": "termId", "indexed": true } + ], + "anonymous": false + }, + { + "type": "event", + "name": "NewDispute", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "address", "name": "subject", "indexed": true }, + { "type": "uint64", "name": "draftTermId", "indexed": true }, + { "type": "uint64", "name": "jurorsNumber", "indexed": false }, + { "type": "bytes", "name": "metadata", "indexed": false } + ], + "anonymous": false + }, + { + "type": "event", + "name": "JurorDrafted", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "uint256", "name": "roundId", "indexed": true }, + { "type": "address", "name": "juror", "indexed": true } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulingAppealed", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "uint256", "name": "roundId", "indexed": true }, + { "type": "uint8", "name": "ruling", "indexed": false } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulingAppealConfirmed", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "uint256", "name": "roundId", "indexed": true }, + { "type": "uint64", "name": "draftTermId", "indexed": true }, + { "type": "uint256", "name": "jurorsNumber", "indexed": false } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulingComputed", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "uint8", "name": "ruling", "indexed": true } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PenaltiesSettled", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "uint256", "name": "roundId", "indexed": true }, + { "type": "uint256", "name": "collectedTokens", "indexed": false } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RewardSettled", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "uint256", "name": "roundId", "indexed": true }, + { "type": "address", "name": "juror", "indexed": false }, + { "type": "uint256", "name": "tokens", "indexed": false }, + { "type": "uint256", "name": "fees", "indexed": false } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AppealDepositSettled", + "inputs": [ + { "type": "uint256", "name": "disputeId", "indexed": true }, + { "type": "uint256", "name": "roundId", "indexed": true } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MaxJurorsPerDraftBatchChanged", + "inputs": [ + { + "type": "uint64", + "name": "previousMaxJurorsPerDraftBatch", + "indexed": false + }, + { + "type": "uint64", + "name": "currentMaxJurorsPerDraftBatch", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RecoverFunds", + "inputs": [ + { "type": "address", "name": "token", "indexed": false }, + { "type": "address", "name": "recipient", "indexed": false }, + { "type": "uint256", "name": "balance", "indexed": false } + ], + "anonymous": false + } +] diff --git a/generated/AragonCourt/AragonCourt.ts b/generated/AragonCourt/AragonCourt.ts index 5a1f08c..37bf648 100644 --- a/generated/AragonCourt/AragonCourt.ts +++ b/generated/AragonCourt/AragonCourt.ts @@ -10,498 +10,237 @@ import { BigInt } from "@graphprotocol/graph-ts"; -export class Heartbeat extends ethereum.Event { - get params(): Heartbeat__Params { - return new Heartbeat__Params(this); - } -} - -export class Heartbeat__Params { - _event: Heartbeat; - - constructor(event: Heartbeat) { - this._event = event; - } - - get previousTermId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get currentTermId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class StartTimeDelayed extends ethereum.Event { - get params(): StartTimeDelayed__Params { - return new StartTimeDelayed__Params(this); - } -} - -export class StartTimeDelayed__Params { - _event: StartTimeDelayed; - - constructor(event: StartTimeDelayed) { - this._event = event; - } - - get previousStartTime(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get currentStartTime(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class DisputeStateChanged extends ethereum.Event { - get params(): DisputeStateChanged__Params { - return new DisputeStateChanged__Params(this); - } -} - -export class DisputeStateChanged__Params { - _event: DisputeStateChanged; - - constructor(event: DisputeStateChanged) { - this._event = event; - } - - get disputeId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get state(): i32 { - return this._event.parameters[1].value.toI32(); - } -} - -export class EvidenceSubmitted extends ethereum.Event { - get params(): EvidenceSubmitted__Params { - return new EvidenceSubmitted__Params(this); +export class ModuleSet extends ethereum.Event { + get params(): ModuleSet__Params { + return new ModuleSet__Params(this); } } -export class EvidenceSubmitted__Params { - _event: EvidenceSubmitted; +export class ModuleSet__Params { + _event: ModuleSet; - constructor(event: EvidenceSubmitted) { + constructor(event: ModuleSet) { this._event = event; } - get disputeId(): BigInt { - return this._event.parameters[0].value.toBigInt(); + get id(): Bytes { + return this._event.parameters[0].value.toBytes(); } - get submitter(): Address { + get addr(): Address { return this._event.parameters[1].value.toAddress(); } - - get evidence(): Bytes { - return this._event.parameters[2].value.toBytes(); - } } -export class EvidencePeriodClosed extends ethereum.Event { - get params(): EvidencePeriodClosed__Params { - return new EvidencePeriodClosed__Params(this); - } -} - -export class EvidencePeriodClosed__Params { - _event: EvidencePeriodClosed; - - constructor(event: EvidencePeriodClosed) { - this._event = event; - } - - get disputeId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get termId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } -} - -export class NewDispute extends ethereum.Event { - get params(): NewDispute__Params { - return new NewDispute__Params(this); +export class FundsGovernorChanged extends ethereum.Event { + get params(): FundsGovernorChanged__Params { + return new FundsGovernorChanged__Params(this); } } -export class NewDispute__Params { - _event: NewDispute; +export class FundsGovernorChanged__Params { + _event: FundsGovernorChanged; - constructor(event: NewDispute) { + constructor(event: FundsGovernorChanged) { this._event = event; } - get disputeId(): BigInt { - return this._event.parameters[0].value.toBigInt(); + get previousGovernor(): Address { + return this._event.parameters[0].value.toAddress(); } - get subject(): Address { + get currentGovernor(): Address { return this._event.parameters[1].value.toAddress(); } - - get draftTermId(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get jurorsNumber(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } - - get metadata(): Bytes { - return this._event.parameters[4].value.toBytes(); - } -} - -export class JurorDrafted extends ethereum.Event { - get params(): JurorDrafted__Params { - return new JurorDrafted__Params(this); - } } -export class JurorDrafted__Params { - _event: JurorDrafted; - - constructor(event: JurorDrafted) { - this._event = event; - } - - get disputeId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get roundId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get juror(): Address { - return this._event.parameters[2].value.toAddress(); - } -} - -export class RulingAppealed extends ethereum.Event { - get params(): RulingAppealed__Params { - return new RulingAppealed__Params(this); +export class ConfigGovernorChanged extends ethereum.Event { + get params(): ConfigGovernorChanged__Params { + return new ConfigGovernorChanged__Params(this); } } -export class RulingAppealed__Params { - _event: RulingAppealed; +export class ConfigGovernorChanged__Params { + _event: ConfigGovernorChanged; - constructor(event: RulingAppealed) { + constructor(event: ConfigGovernorChanged) { this._event = event; } - get disputeId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get roundId(): BigInt { - return this._event.parameters[1].value.toBigInt(); + get previousGovernor(): Address { + return this._event.parameters[0].value.toAddress(); } - get ruling(): i32 { - return this._event.parameters[2].value.toI32(); + get currentGovernor(): Address { + return this._event.parameters[1].value.toAddress(); } } -export class RulingAppealConfirmed extends ethereum.Event { - get params(): RulingAppealConfirmed__Params { - return new RulingAppealConfirmed__Params(this); +export class FeesUpdaterChanged extends ethereum.Event { + get params(): FeesUpdaterChanged__Params { + return new FeesUpdaterChanged__Params(this); } } -export class RulingAppealConfirmed__Params { - _event: RulingAppealConfirmed; +export class FeesUpdaterChanged__Params { + _event: FeesUpdaterChanged; - constructor(event: RulingAppealConfirmed) { + constructor(event: FeesUpdaterChanged) { this._event = event; } - get disputeId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get roundId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get draftTermId(): BigInt { - return this._event.parameters[2].value.toBigInt(); + get previousFeesUpdater(): Address { + return this._event.parameters[0].value.toAddress(); } - get jurorsNumber(): BigInt { - return this._event.parameters[3].value.toBigInt(); + get currentFeesUpdater(): Address { + return this._event.parameters[1].value.toAddress(); } } -export class RulingComputed extends ethereum.Event { - get params(): RulingComputed__Params { - return new RulingComputed__Params(this); +export class ModulesGovernorChanged extends ethereum.Event { + get params(): ModulesGovernorChanged__Params { + return new ModulesGovernorChanged__Params(this); } } -export class RulingComputed__Params { - _event: RulingComputed; +export class ModulesGovernorChanged__Params { + _event: ModulesGovernorChanged; - constructor(event: RulingComputed) { + constructor(event: ModulesGovernorChanged) { this._event = event; } - get disputeId(): BigInt { - return this._event.parameters[0].value.toBigInt(); + get previousGovernor(): Address { + return this._event.parameters[0].value.toAddress(); } - get ruling(): i32 { - return this._event.parameters[1].value.toI32(); + get currentGovernor(): Address { + return this._event.parameters[1].value.toAddress(); } } -export class PenaltiesSettled extends ethereum.Event { - get params(): PenaltiesSettled__Params { - return new PenaltiesSettled__Params(this); +export class NewConfig extends ethereum.Event { + get params(): NewConfig__Params { + return new NewConfig__Params(this); } } -export class PenaltiesSettled__Params { - _event: PenaltiesSettled; +export class NewConfig__Params { + _event: NewConfig; - constructor(event: PenaltiesSettled) { + constructor(event: NewConfig) { this._event = event; } - get disputeId(): BigInt { + get fromTermId(): BigInt { return this._event.parameters[0].value.toBigInt(); } - get roundId(): BigInt { + get courtConfigId(): BigInt { return this._event.parameters[1].value.toBigInt(); } - - get collectedTokens(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } } -export class RewardSettled extends ethereum.Event { - get params(): RewardSettled__Params { - return new RewardSettled__Params(this); +export class AutomaticWithdrawalsAllowedChanged extends ethereum.Event { + get params(): AutomaticWithdrawalsAllowedChanged__Params { + return new AutomaticWithdrawalsAllowedChanged__Params(this); } } -export class RewardSettled__Params { - _event: RewardSettled; +export class AutomaticWithdrawalsAllowedChanged__Params { + _event: AutomaticWithdrawalsAllowedChanged; - constructor(event: RewardSettled) { + constructor(event: AutomaticWithdrawalsAllowedChanged) { this._event = event; } - get disputeId(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get roundId(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get juror(): Address { - return this._event.parameters[2].value.toAddress(); - } - - get tokens(): BigInt { - return this._event.parameters[3].value.toBigInt(); + get holder(): Address { + return this._event.parameters[0].value.toAddress(); } - get fees(): BigInt { - return this._event.parameters[4].value.toBigInt(); + get allowed(): boolean { + return this._event.parameters[1].value.toBoolean(); } } -export class AppealDepositSettled extends ethereum.Event { - get params(): AppealDepositSettled__Params { - return new AppealDepositSettled__Params(this); +export class Heartbeat extends ethereum.Event { + get params(): Heartbeat__Params { + return new Heartbeat__Params(this); } } -export class AppealDepositSettled__Params { - _event: AppealDepositSettled; +export class Heartbeat__Params { + _event: Heartbeat; - constructor(event: AppealDepositSettled) { + constructor(event: Heartbeat) { this._event = event; } - get disputeId(): BigInt { + get previousTermId(): BigInt { return this._event.parameters[0].value.toBigInt(); } - get roundId(): BigInt { + get currentTermId(): BigInt { return this._event.parameters[1].value.toBigInt(); } } -export class MaxJurorsPerDraftBatchChanged extends ethereum.Event { - get params(): MaxJurorsPerDraftBatchChanged__Params { - return new MaxJurorsPerDraftBatchChanged__Params(this); +export class StartTimeDelayed extends ethereum.Event { + get params(): StartTimeDelayed__Params { + return new StartTimeDelayed__Params(this); } } -export class MaxJurorsPerDraftBatchChanged__Params { - _event: MaxJurorsPerDraftBatchChanged; +export class StartTimeDelayed__Params { + _event: StartTimeDelayed; - constructor(event: MaxJurorsPerDraftBatchChanged) { + constructor(event: StartTimeDelayed) { this._event = event; } - get previousMaxJurorsPerDraftBatch(): BigInt { + get previousStartTime(): BigInt { return this._event.parameters[0].value.toBigInt(); } - get currentMaxJurorsPerDraftBatch(): BigInt { + get currentStartTime(): BigInt { return this._event.parameters[1].value.toBigInt(); } } -export class ModuleSet extends ethereum.Event { - get params(): ModuleSet__Params { - return new ModuleSet__Params(this); - } -} - -export class ModuleSet__Params { - _event: ModuleSet; - - constructor(event: ModuleSet) { - this._event = event; - } - - get id(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get addr(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class FundsGovernorChanged extends ethereum.Event { - get params(): FundsGovernorChanged__Params { - return new FundsGovernorChanged__Params(this); - } -} - -export class FundsGovernorChanged__Params { - _event: FundsGovernorChanged; - - constructor(event: FundsGovernorChanged) { - this._event = event; - } - - get previousGovernor(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get currentGovernor(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class ConfigGovernorChanged extends ethereum.Event { - get params(): ConfigGovernorChanged__Params { - return new ConfigGovernorChanged__Params(this); - } -} - -export class ConfigGovernorChanged__Params { - _event: ConfigGovernorChanged; - - constructor(event: ConfigGovernorChanged) { - this._event = event; - } - - get previousGovernor(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get currentGovernor(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class FeesUpdaterChanged extends ethereum.Event { - get params(): FeesUpdaterChanged__Params { - return new FeesUpdaterChanged__Params(this); - } -} - -export class FeesUpdaterChanged__Params { - _event: FeesUpdaterChanged; - - constructor(event: FeesUpdaterChanged) { - this._event = event; - } - - get previousFeesUpdater(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get currentFeesUpdater(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class ModulesGovernorChanged extends ethereum.Event { - get params(): ModulesGovernorChanged__Params { - return new ModulesGovernorChanged__Params(this); - } -} - -export class ModulesGovernorChanged__Params { - _event: ModulesGovernorChanged; - - constructor(event: ModulesGovernorChanged) { - this._event = event; - } - - get previousGovernor(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get currentGovernor(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class AragonCourt__disputesResult { +export class AragonCourt__getDraftConfigResult { value0: Address; - value1: i32; + value1: BigInt; + value2: i32; - constructor(value0: Address, value1: i32) { + constructor(value0: Address, value1: BigInt, value2: i32) { this.value0 = value0; this.value1 = value1; + this.value2 = value2; } toMap(): TypedMap { let map = new TypedMap(); map.set("value0", ethereum.Value.fromAddress(this.value0)); + map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); map.set( - "value1", - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(this.value1)) + "value2", + ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(this.value2)) ); return map; } - getSubject(): Address { + getFeeToken(): Address { return this.value0; } - getState(): i32 { + getDraftFee(): BigInt { return this.value1; } + + getPenaltyPct(): i32 { + return this.value2; + } } export class AragonCourt__getDisputeFeesResult { @@ -523,47 +262,19 @@ export class AragonCourt__getDisputeFeesResult { return map; } - getValue0(): Address { + getRecipient(): Address { return this.value0; } - getValue1(): Address { + getFeeToken(): Address { return this.value1; } - getValue2(): BigInt { + getFeeAmount(): BigInt { return this.value2; } } -export class AragonCourt__computeRulingResult { - value0: Address; - value1: i32; - - constructor(value0: Address, value1: i32) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromAddress(this.value0)); - map.set( - "value1", - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(this.value1)) - ); - return map; - } - - getSubject(): Address { - return this.value0; - } - - getFinalRuling(): i32 { - return this.value1; - } -} - export class AragonCourt__ruleResult { value0: Address; value1: BigInt; @@ -631,7 +342,7 @@ export class AragonCourt__getConfigResult { return map; } - get_feeToken(): Address { + getFeeToken(): Address { return this.value0; } @@ -765,6 +476,29 @@ export class AragonCourt extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } + areWithdrawalsAllowedFor(_holder: Address): boolean { + let result = super.call( + "areWithdrawalsAllowedFor", + "areWithdrawalsAllowedFor(address):(bool)", + [ethereum.Value.fromAddress(_holder)] + ); + + return result[0].toBoolean(); + } + + try_areWithdrawalsAllowedFor(_holder: Address): ethereum.CallResult { + let result = super.tryCall( + "areWithdrawalsAllowedFor", + "areWithdrawalsAllowedFor(address):(bool)", + [ethereum.Value.fromAddress(_holder)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBoolean()); + } + getTreasury(): Address { let result = super.call("getTreasury", "getTreasury():(address)", []); @@ -826,6 +560,29 @@ export class AragonCourt extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toAddress()); } + ensureCurrentTerm(): BigInt { + let result = super.call( + "ensureCurrentTerm", + "ensureCurrentTerm():(uint64)", + [] + ); + + return result[0].toBigInt(); + } + + try_ensureCurrentTerm(): ethereum.CallResult { + let result = super.tryCall( + "ensureCurrentTerm", + "ensureCurrentTerm():(uint64)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + getModulesGovernor(): Address { let result = super.call( "getModulesGovernor", @@ -849,57 +606,103 @@ export class AragonCourt extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toAddress()); } - disputes(param0: BigInt): AragonCourt__disputesResult { - let result = super.call("disputes", "disputes(uint256):(address,uint8)", [ - ethereum.Value.fromUnsignedBigInt(param0) - ]); + getNeededTermTransitions(): BigInt { + let result = super.call( + "getNeededTermTransitions", + "getNeededTermTransitions():(uint64)", + [] + ); + + return result[0].toBigInt(); + } - return new AragonCourt__disputesResult( + try_getNeededTermTransitions(): ethereum.CallResult { + let result = super.tryCall( + "getNeededTermTransitions", + "getNeededTermTransitions():(uint64)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + getTermRandomness(_termId: BigInt): Bytes { + let result = super.call( + "getTermRandomness", + "getTermRandomness(uint64):(bytes32)", + [ethereum.Value.fromUnsignedBigInt(_termId)] + ); + + return result[0].toBytes(); + } + + try_getTermRandomness(_termId: BigInt): ethereum.CallResult { + let result = super.tryCall( + "getTermRandomness", + "getTermRandomness(uint64):(bytes32)", + [ethereum.Value.fromUnsignedBigInt(_termId)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBytes()); + } + + getDraftConfig(_termId: BigInt): AragonCourt__getDraftConfigResult { + let result = super.call( + "getDraftConfig", + "getDraftConfig(uint64):(address,uint256,uint16)", + [ethereum.Value.fromUnsignedBigInt(_termId)] + ); + + return new AragonCourt__getDraftConfigResult( result[0].toAddress(), - result[1].toI32() + result[1].toBigInt(), + result[2].toI32() ); } - try_disputes( - param0: BigInt - ): ethereum.CallResult { + try_getDraftConfig( + _termId: BigInt + ): ethereum.CallResult { let result = super.tryCall( - "disputes", - "disputes(uint256):(address,uint8)", - [ethereum.Value.fromUnsignedBigInt(param0)] + "getDraftConfig", + "getDraftConfig(uint64):(address,uint256,uint16)", + [ethereum.Value.fromUnsignedBigInt(_termId)] ); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; return ethereum.CallResult.fromValue( - new AragonCourt__disputesResult(value[0].toAddress(), value[1].toI32()) + new AragonCourt__getDraftConfigResult( + value[0].toAddress(), + value[1].toBigInt(), + value[2].toI32() + ) ); } - feeToken(): Address { - let result = super.call("feeToken", "feeToken():(address)", []); - - return result[0].toAddress(); - } - - try_feeToken(): ethereum.CallResult
{ - let result = super.tryCall("feeToken", "feeToken():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - feeAmount(): BigInt { - let result = super.call("feeAmount", "feeAmount():(uint256)", []); + getConfigChangeTermId(): BigInt { + let result = super.call( + "getConfigChangeTermId", + "getConfigChangeTermId():(uint64)", + [] + ); return result[0].toBigInt(); } - try_feeAmount(): ethereum.CallResult { - let result = super.tryCall("feeAmount", "feeAmount():(uint256)", []); + try_getConfigChangeTermId(): ethereum.CallResult { + let result = super.tryCall( + "getConfigChangeTermId", + "getConfigChangeTermId():(uint64)", + [] + ); if (result.reverted) { return new ethereum.CallResult(); } @@ -963,33 +766,64 @@ export class AragonCourt extends ethereum.SmartContract { ); } - getModule(_id: Bytes): Address { - let result = super.call("getModule", "getModule(bytes32):(address)", [ - ethereum.Value.fromFixedBytes(_id) - ]); + ensureCurrentTermRandomness(): Bytes { + let result = super.call( + "ensureCurrentTermRandomness", + "ensureCurrentTermRandomness():(bytes32)", + [] + ); - return result[0].toAddress(); + return result[0].toBytes(); } - try_getModule(_id: Bytes): ethereum.CallResult
{ - let result = super.tryCall("getModule", "getModule(bytes32):(address)", [ - ethereum.Value.fromFixedBytes(_id) - ]); + try_ensureCurrentTermRandomness(): ethereum.CallResult { + let result = super.tryCall( + "ensureCurrentTermRandomness", + "ensureCurrentTermRandomness():(bytes32)", + [] + ); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); + return ethereum.CallResult.fromValue(value[0].toBytes()); + } + + getTermTokenTotalSupply(_termId: BigInt): BigInt { + let result = super.call( + "getTermTokenTotalSupply", + "getTermTokenTotalSupply(uint64):(uint256)", + [ethereum.Value.fromUnsignedBigInt(_termId)] + ); + + return result[0].toBigInt(); + } + + try_getTermTokenTotalSupply(_termId: BigInt): ethereum.CallResult { + let result = super.tryCall( + "getTermTokenTotalSupply", + "getTermTokenTotalSupply(uint64):(uint256)", + [ethereum.Value.fromUnsignedBigInt(_termId)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); } - owner(): Address { - let result = super.call("owner", "owner():(address)", []); + getModule(_id: Bytes): Address { + let result = super.call("getModule", "getModule(bytes32):(address)", [ + ethereum.Value.fromFixedBytes(_id) + ]); return result[0].toAddress(); } - try_owner(): ethereum.CallResult
{ - let result = super.tryCall("owner", "owner():(address)", []); + try_getModule(_id: Bytes): ethereum.CallResult
{ + let result = super.tryCall("getModule", "getModule(bytes32):(address)", [ + ethereum.Value.fromFixedBytes(_id) + ]); if (result.reverted) { return new ethereum.CallResult(); } @@ -1020,6 +854,29 @@ export class AragonCourt extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toAddress()); } + getMinActiveBalance(_termId: BigInt): BigInt { + let result = super.call( + "getMinActiveBalance", + "getMinActiveBalance(uint64):(uint256)", + [ethereum.Value.fromUnsignedBigInt(_termId)] + ); + + return result[0].toBigInt(); + } + + try_getMinActiveBalance(_termId: BigInt): ethereum.CallResult { + let result = super.tryCall( + "getMinActiveBalance", + "getMinActiveBalance(uint64):(uint256)", + [ethereum.Value.fromUnsignedBigInt(_termId)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + getConfigGovernor(): Address { let result = super.call( "getConfigGovernor", @@ -1081,39 +938,6 @@ export class AragonCourt extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toAddress()); } - computeRuling(_disputeId: BigInt): AragonCourt__computeRulingResult { - let result = super.call( - "computeRuling", - "computeRuling(uint256):(address,uint8)", - [ethereum.Value.fromUnsignedBigInt(_disputeId)] - ); - - return new AragonCourt__computeRulingResult( - result[0].toAddress(), - result[1].toI32() - ); - } - - try_computeRuling( - _disputeId: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "computeRuling", - "computeRuling(uint256):(address,uint8)", - [ethereum.Value.fromUnsignedBigInt(_disputeId)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new AragonCourt__computeRulingResult( - value[0].toAddress(), - value[1].toI32() - ) - ); - } - createDispute(_possibleRulings: BigInt, _metadata: Bytes): BigInt { let result = super.call( "createDispute", @@ -1196,7 +1020,7 @@ export class AragonCourt extends ethereum.SmartContract { getConfig(_termId: BigInt): AragonCourt__getConfigResult { let result = super.call( "getConfig", - "getConfig(uint64):(address,uint256[3],uint8,uint64[9],uint16[2],uint256[2],uint256[4])", + "getConfig(uint64):(address,uint256[3],uint8,uint64[9],uint16[2],uint256[2],uint256[3])", [ethereum.Value.fromUnsignedBigInt(_termId)] ); @@ -1216,7 +1040,7 @@ export class AragonCourt extends ethereum.SmartContract { ): ethereum.CallResult { let result = super.tryCall( "getConfig", - "getConfig(uint64):(address,uint256[3],uint8,uint64[9],uint16[2],uint256[2],uint256[4])", + "getConfig(uint64):(address,uint256[3],uint8,uint64[9],uint16[2],uint256[2],uint256[3])", [ethereum.Value.fromUnsignedBigInt(_termId)] ); if (result.reverted) { @@ -1236,21 +1060,6 @@ export class AragonCourt extends ethereum.SmartContract { ); } - currentId(): BigInt { - let result = super.call("currentId", "currentId():(uint256)", []); - - return result[0].toBigInt(); - } - - try_currentId(): ethereum.CallResult { - let result = super.tryCall("currentId", "currentId():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - getTerm(_termId: BigInt): AragonCourt__getTermResult { let result = super.call( "getTerm", @@ -1287,70 +1096,93 @@ export class AragonCourt extends ethereum.SmartContract { ) ); } -} -export class SetOwnerCall extends ethereum.Call { - get inputs(): SetOwnerCall__Inputs { - return new SetOwnerCall__Inputs(this); + getLastEnsuredTermId(): BigInt { + let result = super.call( + "getLastEnsuredTermId", + "getLastEnsuredTermId():(uint64)", + [] + ); + + return result[0].toBigInt(); } - get outputs(): SetOwnerCall__Outputs { - return new SetOwnerCall__Outputs(this); + try_getLastEnsuredTermId(): ethereum.CallResult { + let result = super.tryCall( + "getLastEnsuredTermId", + "getLastEnsuredTermId():(uint64)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); } } -export class SetOwnerCall__Inputs { - _call: SetOwnerCall; - - constructor(call: SetOwnerCall) { - this._call = call; +export class SetModulesCall extends ethereum.Call { + get inputs(): SetModulesCall__Inputs { + return new SetModulesCall__Inputs(this); } - get _owner(): Address { - return this._call.inputValues[0].value.toAddress(); + get outputs(): SetModulesCall__Outputs { + return new SetModulesCall__Outputs(this); } } -export class SetOwnerCall__Outputs { - _call: SetOwnerCall; +export class SetModulesCall__Inputs { + _call: SetModulesCall; - constructor(call: SetOwnerCall) { + constructor(call: SetModulesCall) { this._call = call; } -} -export class DecideDisputeCall extends ethereum.Call { - get inputs(): DecideDisputeCall__Inputs { - return new DecideDisputeCall__Inputs(this); + get _ids(): Array { + return this._call.inputValues[0].value.toBytesArray(); } - get outputs(): DecideDisputeCall__Outputs { - return new DecideDisputeCall__Outputs(this); + get _addresses(): Array
{ + return this._call.inputValues[1].value.toAddressArray(); } } -export class DecideDisputeCall__Inputs { - _call: DecideDisputeCall; +export class SetModulesCall__Outputs { + _call: SetModulesCall; - constructor(call: DecideDisputeCall) { + constructor(call: SetModulesCall) { this._call = call; } +} - get _disputeId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); +export class EnsureCurrentTermCall extends ethereum.Call { + get inputs(): EnsureCurrentTermCall__Inputs { + return new EnsureCurrentTermCall__Inputs(this); + } + + get outputs(): EnsureCurrentTermCall__Outputs { + return new EnsureCurrentTermCall__Outputs(this); } +} - get _state(): i32 { - return this._call.inputValues[1].value.toI32(); +export class EnsureCurrentTermCall__Inputs { + _call: EnsureCurrentTermCall; + + constructor(call: EnsureCurrentTermCall) { + this._call = call; } } -export class DecideDisputeCall__Outputs { - _call: DecideDisputeCall; +export class EnsureCurrentTermCall__Outputs { + _call: EnsureCurrentTermCall; - constructor(call: DecideDisputeCall) { + constructor(call: EnsureCurrentTermCall) { this._call = call; } + + get value0(): BigInt { + return this._call.outputValues[0].value.toBigInt(); + } } export class ChangeFeesUpdaterCall extends ethereum.Call { @@ -1434,20 +1266,16 @@ export class SubmitEvidenceCall__Inputs { this._call = call; } - get _subject(): Address { - return this._call.inputValues[0].value.toAddress(); - } - get _disputeId(): BigInt { - return this._call.inputValues[1].value.toBigInt(); + return this._call.inputValues[0].value.toBigInt(); } get _submitter(): Address { - return this._call.inputValues[2].value.toAddress(); + return this._call.inputValues[1].value.toAddress(); } get _evidence(): Bytes { - return this._call.inputValues[3].value.toBytes(); + return this._call.inputValues[2].value.toBytes(); } } @@ -1459,20 +1287,50 @@ export class SubmitEvidenceCall__Outputs { } } -export class DraftCall extends ethereum.Call { - get inputs(): DraftCall__Inputs { - return new DraftCall__Inputs(this); +export class EnsureCurrentTermRandomnessCall extends ethereum.Call { + get inputs(): EnsureCurrentTermRandomnessCall__Inputs { + return new EnsureCurrentTermRandomnessCall__Inputs(this); + } + + get outputs(): EnsureCurrentTermRandomnessCall__Outputs { + return new EnsureCurrentTermRandomnessCall__Outputs(this); + } +} + +export class EnsureCurrentTermRandomnessCall__Inputs { + _call: EnsureCurrentTermRandomnessCall; + + constructor(call: EnsureCurrentTermRandomnessCall) { + this._call = call; + } +} + +export class EnsureCurrentTermRandomnessCall__Outputs { + _call: EnsureCurrentTermRandomnessCall; + + constructor(call: EnsureCurrentTermRandomnessCall) { + this._call = call; + } + + get value0(): Bytes { + return this._call.outputValues[0].value.toBytes(); + } +} + +export class CloseEvidencePeriodCall extends ethereum.Call { + get inputs(): CloseEvidencePeriodCall__Inputs { + return new CloseEvidencePeriodCall__Inputs(this); } - get outputs(): DraftCall__Outputs { - return new DraftCall__Outputs(this); + get outputs(): CloseEvidencePeriodCall__Outputs { + return new CloseEvidencePeriodCall__Outputs(this); } } -export class DraftCall__Inputs { - _call: DraftCall; +export class CloseEvidencePeriodCall__Inputs { + _call: CloseEvidencePeriodCall; - constructor(call: DraftCall) { + constructor(call: CloseEvidencePeriodCall) { this._call = call; } @@ -1481,10 +1339,40 @@ export class DraftCall__Inputs { } } -export class DraftCall__Outputs { - _call: DraftCall; +export class CloseEvidencePeriodCall__Outputs { + _call: CloseEvidencePeriodCall; + + constructor(call: CloseEvidencePeriodCall) { + this._call = call; + } +} + +export class SetAutomaticWithdrawalsCall extends ethereum.Call { + get inputs(): SetAutomaticWithdrawalsCall__Inputs { + return new SetAutomaticWithdrawalsCall__Inputs(this); + } + + get outputs(): SetAutomaticWithdrawalsCall__Outputs { + return new SetAutomaticWithdrawalsCall__Outputs(this); + } +} + +export class SetAutomaticWithdrawalsCall__Inputs { + _call: SetAutomaticWithdrawalsCall; - constructor(call: DraftCall) { + constructor(call: SetAutomaticWithdrawalsCall) { + this._call = call; + } + + get _allowed(): boolean { + return this._call.inputValues[0].value.toBoolean(); + } +} + +export class SetAutomaticWithdrawalsCall__Outputs { + _call: SetAutomaticWithdrawalsCall; + + constructor(call: SetAutomaticWithdrawalsCall) { this._call = call; } } @@ -1579,72 +1467,62 @@ export class HeartbeatCall__Outputs { } } -export class SetTermDurationCall extends ethereum.Call { - get inputs(): SetTermDurationCall__Inputs { - return new SetTermDurationCall__Inputs(this); +export class SetConfigCall extends ethereum.Call { + get inputs(): SetConfigCall__Inputs { + return new SetConfigCall__Inputs(this); } - get outputs(): SetTermDurationCall__Outputs { - return new SetTermDurationCall__Outputs(this); + get outputs(): SetConfigCall__Outputs { + return new SetConfigCall__Outputs(this); } } -export class SetTermDurationCall__Inputs { - _call: SetTermDurationCall; +export class SetConfigCall__Inputs { + _call: SetConfigCall; - constructor(call: SetTermDurationCall) { + constructor(call: SetConfigCall) { this._call = call; } - get _termDuration(): BigInt { + get _fromTermId(): BigInt { return this._call.inputValues[0].value.toBigInt(); } -} -export class SetTermDurationCall__Outputs { - _call: SetTermDurationCall; + get _feeToken(): Address { + return this._call.inputValues[1].value.toAddress(); + } - constructor(call: SetTermDurationCall) { - this._call = call; + get _fees(): Array { + return this._call.inputValues[2].value.toBigIntArray(); } -} -export class ComputeRulingCall extends ethereum.Call { - get inputs(): ComputeRulingCall__Inputs { - return new ComputeRulingCall__Inputs(this); + get _maxRulingOptions(): i32 { + return this._call.inputValues[3].value.toI32(); } - get outputs(): ComputeRulingCall__Outputs { - return new ComputeRulingCall__Outputs(this); + get _roundParams(): Array { + return this._call.inputValues[4].value.toBigIntArray(); } -} -export class ComputeRulingCall__Inputs { - _call: ComputeRulingCall; + get _pcts(): Array { + return this._call.inputValues[5].value.toI32Array(); + } - constructor(call: ComputeRulingCall) { - this._call = call; + get _appealCollateralParams(): Array { + return this._call.inputValues[6].value.toBigIntArray(); } - get _disputeId(): BigInt { - return this._call.inputValues[0].value.toBigInt(); + get _jurorsParams(): Array { + return this._call.inputValues[7].value.toBigIntArray(); } } -export class ComputeRulingCall__Outputs { - _call: ComputeRulingCall; +export class SetConfigCall__Outputs { + _call: SetConfigCall; - constructor(call: ComputeRulingCall) { + constructor(call: SetConfigCall) { this._call = call; } - - get subject(): Address { - return this._call.outputValues[0].value.toAddress(); - } - - get finalRuling(): i32 { - return this._call.outputValues[1].value.toI32(); - } } export class CreateDisputeCall extends ethereum.Call { @@ -1685,40 +1563,6 @@ export class CreateDisputeCall__Outputs { } } -export class CloseEvidencePeriodCall extends ethereum.Call { - get inputs(): CloseEvidencePeriodCall__Inputs { - return new CloseEvidencePeriodCall__Inputs(this); - } - - get outputs(): CloseEvidencePeriodCall__Outputs { - return new CloseEvidencePeriodCall__Outputs(this); - } -} - -export class CloseEvidencePeriodCall__Inputs { - _call: CloseEvidencePeriodCall; - - constructor(call: CloseEvidencePeriodCall) { - this._call = call; - } - - get _subject(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _disputeId(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class CloseEvidencePeriodCall__Outputs { - _call: CloseEvidencePeriodCall; - - constructor(call: CloseEvidencePeriodCall) { - this._call = call; - } -} - export class EjectFundsGovernorCall extends ethereum.Call { get inputs(): EjectFundsGovernorCall__Inputs { return new EjectFundsGovernorCall__Inputs(this); @@ -1890,12 +1734,40 @@ export class ConstructorCall__Inputs { this._call = call; } + get _termParams(): Array { + return this._call.inputValues[0].value.toBigIntArray(); + } + + get _governors(): Array
{ + return this._call.inputValues[1].value.toAddressArray(); + } + get _feeToken(): Address { - return this._call.inputValues[0].value.toAddress(); + return this._call.inputValues[2].value.toAddress(); + } + + get _fees(): Array { + return this._call.inputValues[3].value.toBigIntArray(); + } + + get _maxRulingOptions(): i32 { + return this._call.inputValues[4].value.toI32(); + } + + get _roundParams(): Array { + return this._call.inputValues[5].value.toBigIntArray(); + } + + get _pcts(): Array { + return this._call.inputValues[6].value.toI32Array(); + } + + get _appealCollateralParams(): Array { + return this._call.inputValues[7].value.toBigIntArray(); } - get _feeAmount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); + get _jurorsParams(): Array { + return this._call.inputValues[8].value.toBigIntArray(); } } diff --git a/generated/AragonCourt/BrightIdRegister.ts b/generated/AragonCourt/BrightIdRegister.ts index 47c218c..8038f26 100644 --- a/generated/AragonCourt/BrightIdRegister.ts +++ b/generated/AragonCourt/BrightIdRegister.ts @@ -196,6 +196,29 @@ export class BrightIdRegister extends ethereum.SmartContract { ); } + requiredVerifications(): BigInt { + let result = super.call( + "requiredVerifications", + "requiredVerifications():(uint256)", + [] + ); + + return result[0].toBigInt(); + } + + try_requiredVerifications(): ethereum.CallResult { + let result = super.tryCall( + "requiredVerifications", + "requiredVerifications():(uint256)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + getEVMScriptExecutor(_script: Bytes): Address { let result = super.call( "getEVMScriptExecutor", @@ -334,6 +357,29 @@ export class BrightIdRegister extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toAddress()); } + MAX_BRIGHTID_VERIFIERS(): BigInt { + let result = super.call( + "MAX_BRIGHTID_VERIFIERS", + "MAX_BRIGHTID_VERIFIERS():(uint256)", + [] + ); + + return result[0].toBigInt(); + } + + try_MAX_BRIGHTID_VERIFIERS(): ethereum.CallResult { + let result = super.tryCall( + "MAX_BRIGHTID_VERIFIERS", + "MAX_BRIGHTID_VERIFIERS():(uint256)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + registrationPeriod(): BigInt { let result = super.call( "registrationPeriod", @@ -591,6 +637,29 @@ export class BrightIdRegister extends ethereum.SmartContract { let value = result.value; return ethereum.CallResult.fromValue(value[0].toBigInt()); } + + MIN_BRIGHTID_VERIFIERS(): BigInt { + let result = super.call( + "MIN_BRIGHTID_VERIFIERS", + "MIN_BRIGHTID_VERIFIERS():(uint256)", + [] + ); + + return result[0].toBigInt(); + } + + try_MIN_BRIGHTID_VERIFIERS(): ethereum.CallResult { + let result = super.tryCall( + "MIN_BRIGHTID_VERIFIERS", + "MIN_BRIGHTID_VERIFIERS():(uint256)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } } export class RegisterCall extends ethereum.Call { @@ -707,48 +776,6 @@ export class SetRegistrationPeriodCall__Outputs { } } -export class InitializeCall extends ethereum.Call { - get inputs(): InitializeCall__Inputs { - return new InitializeCall__Inputs(this); - } - - get outputs(): InitializeCall__Outputs { - return new InitializeCall__Outputs(this); - } -} - -export class InitializeCall__Inputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } - - get _brightIdContext(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get _brightIdVerifiers(): Array
{ - return this._call.inputValues[1].value.toAddressArray(); - } - - get _registrationPeriod(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get _verificationTimestampVariance(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class InitializeCall__Outputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } -} - export class TransferToVaultCall extends ethereum.Call { get inputs(): TransferToVaultCall__Inputs { return new TransferToVaultCall__Inputs(this); @@ -799,6 +826,10 @@ export class SetBrightIdVerifiersCall__Inputs { get _brightIdVerifiers(): Array
{ return this._call.inputValues[0].value.toAddressArray(); } + + get _requiredVerifications(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } } export class SetBrightIdVerifiersCall__Outputs { @@ -808,3 +839,49 @@ export class SetBrightIdVerifiersCall__Outputs { this._call = call; } } + +export class InitializeCall extends ethereum.Call { + get inputs(): InitializeCall__Inputs { + return new InitializeCall__Inputs(this); + } + + get outputs(): InitializeCall__Outputs { + return new InitializeCall__Outputs(this); + } +} + +export class InitializeCall__Inputs { + _call: InitializeCall; + + constructor(call: InitializeCall) { + this._call = call; + } + + get _brightIdContext(): Bytes { + return this._call.inputValues[0].value.toBytes(); + } + + get _brightIdVerifiers(): Array
{ + return this._call.inputValues[1].value.toAddressArray(); + } + + get _requiredVerifications(): BigInt { + return this._call.inputValues[2].value.toBigInt(); + } + + get _registrationPeriod(): BigInt { + return this._call.inputValues[3].value.toBigInt(); + } + + get _verificationTimestampVariance(): BigInt { + return this._call.inputValues[4].value.toBigInt(); + } +} + +export class InitializeCall__Outputs { + _call: InitializeCall; + + constructor(call: InitializeCall) { + this._call = call; + } +} diff --git a/generated/templates/BrightIdRegister/BrightIdRegister.ts b/generated/templates/BrightIdRegister/BrightIdRegister.ts index 47c218c..8038f26 100644 --- a/generated/templates/BrightIdRegister/BrightIdRegister.ts +++ b/generated/templates/BrightIdRegister/BrightIdRegister.ts @@ -196,6 +196,29 @@ export class BrightIdRegister extends ethereum.SmartContract { ); } + requiredVerifications(): BigInt { + let result = super.call( + "requiredVerifications", + "requiredVerifications():(uint256)", + [] + ); + + return result[0].toBigInt(); + } + + try_requiredVerifications(): ethereum.CallResult { + let result = super.tryCall( + "requiredVerifications", + "requiredVerifications():(uint256)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + getEVMScriptExecutor(_script: Bytes): Address { let result = super.call( "getEVMScriptExecutor", @@ -334,6 +357,29 @@ export class BrightIdRegister extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toAddress()); } + MAX_BRIGHTID_VERIFIERS(): BigInt { + let result = super.call( + "MAX_BRIGHTID_VERIFIERS", + "MAX_BRIGHTID_VERIFIERS():(uint256)", + [] + ); + + return result[0].toBigInt(); + } + + try_MAX_BRIGHTID_VERIFIERS(): ethereum.CallResult { + let result = super.tryCall( + "MAX_BRIGHTID_VERIFIERS", + "MAX_BRIGHTID_VERIFIERS():(uint256)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + registrationPeriod(): BigInt { let result = super.call( "registrationPeriod", @@ -591,6 +637,29 @@ export class BrightIdRegister extends ethereum.SmartContract { let value = result.value; return ethereum.CallResult.fromValue(value[0].toBigInt()); } + + MIN_BRIGHTID_VERIFIERS(): BigInt { + let result = super.call( + "MIN_BRIGHTID_VERIFIERS", + "MIN_BRIGHTID_VERIFIERS():(uint256)", + [] + ); + + return result[0].toBigInt(); + } + + try_MIN_BRIGHTID_VERIFIERS(): ethereum.CallResult { + let result = super.tryCall( + "MIN_BRIGHTID_VERIFIERS", + "MIN_BRIGHTID_VERIFIERS():(uint256)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } } export class RegisterCall extends ethereum.Call { @@ -707,48 +776,6 @@ export class SetRegistrationPeriodCall__Outputs { } } -export class InitializeCall extends ethereum.Call { - get inputs(): InitializeCall__Inputs { - return new InitializeCall__Inputs(this); - } - - get outputs(): InitializeCall__Outputs { - return new InitializeCall__Outputs(this); - } -} - -export class InitializeCall__Inputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } - - get _brightIdContext(): Bytes { - return this._call.inputValues[0].value.toBytes(); - } - - get _brightIdVerifiers(): Array
{ - return this._call.inputValues[1].value.toAddressArray(); - } - - get _registrationPeriod(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get _verificationTimestampVariance(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } -} - -export class InitializeCall__Outputs { - _call: InitializeCall; - - constructor(call: InitializeCall) { - this._call = call; - } -} - export class TransferToVaultCall extends ethereum.Call { get inputs(): TransferToVaultCall__Inputs { return new TransferToVaultCall__Inputs(this); @@ -799,6 +826,10 @@ export class SetBrightIdVerifiersCall__Inputs { get _brightIdVerifiers(): Array
{ return this._call.inputValues[0].value.toAddressArray(); } + + get _requiredVerifications(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } } export class SetBrightIdVerifiersCall__Outputs { @@ -808,3 +839,49 @@ export class SetBrightIdVerifiersCall__Outputs { this._call = call; } } + +export class InitializeCall extends ethereum.Call { + get inputs(): InitializeCall__Inputs { + return new InitializeCall__Inputs(this); + } + + get outputs(): InitializeCall__Outputs { + return new InitializeCall__Outputs(this); + } +} + +export class InitializeCall__Inputs { + _call: InitializeCall; + + constructor(call: InitializeCall) { + this._call = call; + } + + get _brightIdContext(): Bytes { + return this._call.inputValues[0].value.toBytes(); + } + + get _brightIdVerifiers(): Array
{ + return this._call.inputValues[1].value.toAddressArray(); + } + + get _requiredVerifications(): BigInt { + return this._call.inputValues[2].value.toBigInt(); + } + + get _registrationPeriod(): BigInt { + return this._call.inputValues[3].value.toBigInt(); + } + + get _verificationTimestampVariance(): BigInt { + return this._call.inputValues[4].value.toBigInt(); + } +} + +export class InitializeCall__Outputs { + _call: InitializeCall; + + constructor(call: InitializeCall) { + this._call = call; + } +} diff --git a/helpers/disputable.ts b/helpers/disputable.ts index fd3a8c7..ea407f5 100644 --- a/helpers/disputable.ts +++ b/helpers/disputable.ts @@ -17,15 +17,18 @@ export function tryDecodingAgreementMetadata(dispute: Dispute): void { let rawMetadata = dispute.rawMetadata; if (rawMetadata.length != AGREEMENT_DISPUTE_METADATA_LENGTH) return; - let header = rawMetadata.subarray(0, AGREEMENT_APP_ID_LENGTH / 2) as Bytes; + let header = Bytes.fromUint8Array( + rawMetadata.subarray(0, AGREEMENT_APP_ID_LENGTH / 2) + ); let actualAppId = header.toHexString().slice(2); if (actualAppId != AGREEMENT_OPEN_APP_ID) return; - let rawChallengeId = rawMetadata.subarray( - AGREEMENT_APP_ID_LENGTH / 2, - rawMetadata.length - ) as Bytes; - let challengeId = BigInt.fromSignedBytes(rawChallengeId.reverse() as Bytes); + let rawChallengeId = Bytes.fromUint8Array( + rawMetadata.subarray(AGREEMENT_APP_ID_LENGTH / 2, rawMetadata.length) + ); + let challengeId = BigInt.fromSignedBytes( + Bytes.fromUint8Array(rawChallengeId.reverse()) + ); let agreement = Agreement.bind(Address.fromString(dispute.subject)); let challengeData = agreement.try_getChallenge(challengeId); if ( diff --git a/package.json b/package.json index cf38275..00057a1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,6 @@ "@aragon/court": "1.1.3", "@aragon/minime": "1.0.0", "@graphprotocol/graph-cli": "^0.37.2", - "@graphprotocol/graph-ts": "^0.29.1" + "@graphprotocol/graph-ts": "^0.29.3" } } diff --git a/src/Subscriptions.ts b/src/Subscriptions.ts index 158ca88..4fc64b7 100644 --- a/src/Subscriptions.ts +++ b/src/Subscriptions.ts @@ -1,4 +1,4 @@ -import { Address, BigInt, Bytes } from '@graphprotocol/graph-ts'; +import { Address, BigInt, Bytes, log } from '@graphprotocol/graph-ts'; import { createFeeMovement } from './Treasury'; import { JurorSubscriptionFee, @@ -83,7 +83,7 @@ function loadOrCreateSubscriptionPeriod( if (period === null) { period = new SubscriptionPeriod(id); - period.feeToken = Bytes.fromHexString('0x') as Bytes; + period.feeToken = Bytes.fromHexString('0x'); period.donatedFees = BigInt.fromI32(0); period.balanceCheckpoint = BigInt.fromI32(0); period.totalActiveBalance = BigInt.fromI32(0); @@ -118,7 +118,16 @@ function loadOrCreateModule(address: Address): SubscriptionModule { subscriptionModule.currentPeriod = BigInt.fromI32(0); subscriptionModule.feeToken = subscriptions.currentFeeToken(); subscriptionModule.periodDuration = subscriptions.periodDuration(); - subscriptionModule.periodPercentageYield = subscriptions.periodPercentageYield(); + let periodPercentageYieldPotentialResult = subscriptions.try_periodPercentageYield(); + if (!periodPercentageYieldPotentialResult.reverted) { + subscriptionModule.periodPercentageYield = + periodPercentageYieldPotentialResult.value; + } else { + subscriptionModule.periodPercentageYield = BigInt.fromI32(0); + log.warning('Could not get periodPercentageYield from subscription {}', [ + address.toHexString(), + ]); + } } return subscriptionModule; diff --git a/yarn.lock b/yarn.lock index 28bd945..2877757 100644 --- a/yarn.lock +++ b/yarn.lock @@ -259,10 +259,10 @@ which "2.0.2" yaml "1.9.2" -"@graphprotocol/graph-ts@^0.29.1": - version "0.29.1" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.29.1.tgz#8f8fb6815fc4a7470bb8aff8004f032a2639300b" - integrity sha512-GhAP2ijk3cTM0xBjoAFxEmdZbYl1BueCYqAGw5G7UyBX3EV8FWkvD5DMam6IkLGqXasBmelCFrROK3B5t6zVdg== +"@graphprotocol/graph-ts@^0.29.3": + version "0.29.3" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.29.3.tgz#f0a664790e966f5fb9bce317a8861e84ec1f3394" + integrity sha512-FXBLGlunOSwjiUXYEz1J9J/I2D/myldyib/9v0R+gn/NJaYqUkXD39UmIuRxqj9cBzB/FYojHzoHidIG5nYZDw== dependencies: assemblyscript "0.19.10" @@ -1525,9 +1525,9 @@ glob@7.1.6, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -"gluegun@git+https://github.com/edgeandnode/gluegun.git#v4.3.1-pin-colors-dep": +"gluegun@https://github.com/edgeandnode/gluegun#v4.3.1-pin-colors-dep": version "4.3.1" - resolved "git+https://github.com/edgeandnode/gluegun.git#b34b9003d7bf556836da41b57ef36eb21570620a" + resolved "https://github.com/edgeandnode/gluegun#b34b9003d7bf556836da41b57ef36eb21570620a" dependencies: apisauce "^1.0.1" app-module-path "^2.2.0"