From de8364cb49d20a0e01935238ad408ed88f7c9bfc Mon Sep 17 00:00:00 2001 From: alcercu Date: Fri, 18 Mar 2022 13:23:42 +0100 Subject: [PATCH 01/14] feat(subgraph): add autogenerated code --- subgraph/abis/Kleroscore.json | 1129 ++++++++++++ subgraph/generated/Kleroscore/Kleroscore.ts | 1731 +++++++++++++++++++ subgraph/generated/schema.ts | 75 + subgraph/package.json | 16 + subgraph/schema.graphql | 6 + subgraph/src/mapping.ts | 89 + subgraph/subgraph.yaml | 41 + subgraph/tsconfig.json | 6 + yarn.lock | 1730 +++++++++++++++++- 9 files changed, 4755 insertions(+), 68 deletions(-) create mode 100644 subgraph/abis/Kleroscore.json create mode 100644 subgraph/generated/Kleroscore/Kleroscore.ts create mode 100644 subgraph/generated/schema.ts create mode 100644 subgraph/package.json create mode 100644 subgraph/schema.graphql create mode 100644 subgraph/src/mapping.ts create mode 100644 subgraph/subgraph.yaml create mode 100644 subgraph/tsconfig.json diff --git a/subgraph/abis/Kleroscore.json b/subgraph/abis/Kleroscore.json new file mode 100644 index 000000000..2bdbf223e --- /dev/null +++ b/subgraph/abis/Kleroscore.json @@ -0,0 +1,1129 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + }, + { + "internalType": "address", + "name": "_jurorProsecutionModule", + "type": "address" + }, + { + "internalType": "contract IDisputeKit", + "name": "_disputeKit", + "type": "address" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "internalType": "uint256", + "name": "_sortitionSumTreeK", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrable", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "AppealDecision", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrable", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "AppealPossible", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "contract IArbitrable", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "DisputeCreation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_appeal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_voteID", + "type": "uint256" + } + ], + "name": "Draw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum KlerosCore.Period", + "name": "_period", + "type": "uint8" + } + ], + "name": "NewPeriod", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_subcourtID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newTotalStake", + "type": "uint256" + } + ], + "name": "StakeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_tokenAmount", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_ETHAmount", + "type": "int256" + } + ], + "name": "TokenAndETHShift", + "type": "event" + }, + { + "inputs": [], + "name": "ALPHA_DIVISOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_STAKE_PATHS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_JURORS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NON_PAYABLE_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IDisputeKit", + "name": "_disputeKitAddress", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_disputeKitID", + "type": "uint8" + } + ], + "name": "addNewDisputeKit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "appeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "appealCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "appealPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "arbitrationCost", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_subcourtID", + "type": "uint256" + } + ], + "name": "areVotesHidden", + "outputs": [ + { + "internalType": "bool", + "name": "hiddenVotes", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_governor", + "type": "address" + } + ], + "name": "changeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_jurorProsecutionModule", + "type": "address" + } + ], + "name": "changeJurorProsecutionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_pinakion", + "type": "address" + } + ], + "name": "changePinakion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_subcourtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + } + ], + "name": "changeSubcourtAlpha", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_subcourtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + } + ], + "name": "changeSubcourtJurorFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_subcourtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + } + ], + "name": "changeSubcourtJurorsForJump", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_subcourtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + } + ], + "name": "changeSubcourtMinStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_subcourtID", + "type": "uint96" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + } + ], + "name": "changeSubcourtTimesPerPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "courts", + "outputs": [ + { + "internalType": "uint96", + "name": "parent", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supportedDisputeKits", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_numberOfChoices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + } + ], + "name": "createDispute", + "outputs": [ + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_parent", + "type": "uint96" + }, + { + "internalType": "bool", + "name": "_hiddenVotes", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_minStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_alpha", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_feeForJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_jurorsForCourtJump", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "_timesPerPeriod", + "type": "uint256[4]" + }, + { + "internalType": "uint256", + "name": "_sortitionSumTreeK", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_supportedDisputeKits", + "type": "uint256" + } + ], + "name": "createSubcourt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "currentRuling", + "outputs": [ + { + "internalType": "uint256", + "name": "ruling", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputeKits", + "outputs": [ + { + "internalType": "contract IDisputeKit", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputes", + "outputs": [ + { + "internalType": "uint96", + "name": "subcourtID", + "type": "uint96" + }, + { + "internalType": "contract IArbitrable", + "name": "arbitrated", + "type": "address" + }, + { + "internalType": "contract IDisputeKit", + "name": "disputeKit", + "type": "address" + }, + { + "internalType": "enum KlerosCore.Period", + "name": "period", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "ruled", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "lastPeriodChange", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nbVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_iterations", + "type": "uint256" + } + ], + "name": "draw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_appeal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_iterations", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "executeGovernorProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "executeRuling", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "enum KlerosCore.Period", + "name": "period", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_juror", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_subcourtID", + "type": "uint96" + } + ], + "name": "getJurorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "staked", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "locked", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getNumberOfRounds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + } + ], + "name": "getRoundInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "tokensAtStakePerJuror", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalFeesForJurors", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "repartitions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "penalties", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "drawnJurors", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_key", + "type": "bytes32" + } + ], + "name": "getSortitionSumTree", + "outputs": [ + { + "internalType": "uint256", + "name": "K", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "stack", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "nodes", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_nodeIndex", + "type": "uint256" + } + ], + "name": "getSortitionSumTreeID", + "outputs": [ + { + "internalType": "bytes32", + "name": "ID", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "getSubcourtID", + "outputs": [ + { + "internalType": "uint256", + "name": "subcourtID", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_subcourtID", + "type": "uint96" + } + ], + "name": "getTimesPerPeriod", + "outputs": [ + { + "internalType": "uint256[4]", + "name": "timesPerPeriod", + "type": "uint256[4]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "isRuled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "jurorProsecutionModule", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "passPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pinakion", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_subcourtID", + "type": "uint96" + }, + { + "internalType": "uint8[]", + "name": "_disputeKitIDs", + "type": "uint8[]" + }, + { + "internalType": "bool", + "name": "_enable", + "type": "bool" + } + ], + "name": "setDisputeKits", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "_subcourtID", + "type": "uint96" + }, + { + "internalType": "uint256", + "name": "_stake", + "type": "uint256" + } + ], + "name": "setStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraph/generated/Kleroscore/Kleroscore.ts b/subgraph/generated/Kleroscore/Kleroscore.ts new file mode 100644 index 000000000..e59a970cc --- /dev/null +++ b/subgraph/generated/Kleroscore/Kleroscore.ts @@ -0,0 +1,1731 @@ +// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { + ethereum, + JSONValue, + TypedMap, + Entity, + Bytes, + Address, + BigInt +} from "@graphprotocol/graph-ts"; + +export class AppealDecision extends ethereum.Event { + get params(): AppealDecision__Params { + return new AppealDecision__Params(this); + } +} + +export class AppealDecision__Params { + _event: AppealDecision; + + constructor(event: AppealDecision) { + this._event = event; + } + + get _disputeID(): BigInt { + return this._event.parameters[0].value.toBigInt(); + } + + get _arbitrable(): Address { + return this._event.parameters[1].value.toAddress(); + } +} + +export class AppealPossible extends ethereum.Event { + get params(): AppealPossible__Params { + return new AppealPossible__Params(this); + } +} + +export class AppealPossible__Params { + _event: AppealPossible; + + constructor(event: AppealPossible) { + this._event = event; + } + + get _disputeID(): BigInt { + return this._event.parameters[0].value.toBigInt(); + } + + get _arbitrable(): Address { + return this._event.parameters[1].value.toAddress(); + } +} + +export class DisputeCreation extends ethereum.Event { + get params(): DisputeCreation__Params { + return new DisputeCreation__Params(this); + } +} + +export class DisputeCreation__Params { + _event: DisputeCreation; + + constructor(event: DisputeCreation) { + this._event = event; + } + + get _disputeID(): BigInt { + return this._event.parameters[0].value.toBigInt(); + } + + get _arbitrable(): Address { + return this._event.parameters[1].value.toAddress(); + } +} + +export class Draw extends ethereum.Event { + get params(): Draw__Params { + return new Draw__Params(this); + } +} + +export class Draw__Params { + _event: Draw; + + constructor(event: Draw) { + this._event = event; + } + + get _address(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get _disputeID(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get _appeal(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get _voteID(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + +export class NewPeriod extends ethereum.Event { + get params(): NewPeriod__Params { + return new NewPeriod__Params(this); + } +} + +export class NewPeriod__Params { + _event: NewPeriod; + + constructor(event: NewPeriod) { + this._event = event; + } + + get _disputeID(): BigInt { + return this._event.parameters[0].value.toBigInt(); + } + + get _period(): i32 { + return this._event.parameters[1].value.toI32(); + } +} + +export class StakeSet extends ethereum.Event { + get params(): StakeSet__Params { + return new StakeSet__Params(this); + } +} + +export class StakeSet__Params { + _event: StakeSet; + + constructor(event: StakeSet) { + this._event = event; + } + + get _address(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get _subcourtID(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get _amount(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get _newTotalStake(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + +export class TokenAndETHShift extends ethereum.Event { + get params(): TokenAndETHShift__Params { + return new TokenAndETHShift__Params(this); + } +} + +export class TokenAndETHShift__Params { + _event: TokenAndETHShift; + + constructor(event: TokenAndETHShift) { + this._event = event; + } + + get _account(): Address { + return this._event.parameters[0].value.toAddress(); + } + + get _disputeID(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get _tokenAmount(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } + + get _ETHAmount(): BigInt { + return this._event.parameters[3].value.toBigInt(); + } +} + +export class Kleroscore__appealPeriodResult { + value0: BigInt; + value1: BigInt; + + constructor(value0: BigInt, value1: BigInt) { + this.value0 = value0; + this.value1 = value1; + } + + toMap(): TypedMap { + let map = new TypedMap(); + map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); + map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); + return map; + } +} + +export class Kleroscore__courtsResult { + value0: BigInt; + value1: boolean; + value2: BigInt; + value3: BigInt; + value4: BigInt; + value5: BigInt; + value6: BigInt; + + constructor( + value0: BigInt, + value1: boolean, + value2: BigInt, + value3: BigInt, + value4: BigInt, + value5: BigInt, + value6: BigInt + ) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + this.value4 = value4; + this.value5 = value5; + this.value6 = value6; + } + + toMap(): TypedMap { + let map = new TypedMap(); + map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); + map.set("value1", ethereum.Value.fromBoolean(this.value1)); + map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); + map.set("value3", ethereum.Value.fromUnsignedBigInt(this.value3)); + map.set("value4", ethereum.Value.fromUnsignedBigInt(this.value4)); + map.set("value5", ethereum.Value.fromUnsignedBigInt(this.value5)); + map.set("value6", ethereum.Value.fromUnsignedBigInt(this.value6)); + return map; + } +} + +export class Kleroscore__disputesResult { + value0: BigInt; + value1: Address; + value2: Address; + value3: i32; + value4: boolean; + value5: BigInt; + value6: BigInt; + + constructor( + value0: BigInt, + value1: Address, + value2: Address, + value3: i32, + value4: boolean, + value5: BigInt, + value6: BigInt + ) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + this.value4 = value4; + this.value5 = value5; + this.value6 = value6; + } + + toMap(): TypedMap { + let map = new TypedMap(); + map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); + map.set("value1", ethereum.Value.fromAddress(this.value1)); + map.set("value2", ethereum.Value.fromAddress(this.value2)); + map.set( + "value3", + ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(this.value3)) + ); + map.set("value4", ethereum.Value.fromBoolean(this.value4)); + map.set("value5", ethereum.Value.fromUnsignedBigInt(this.value5)); + map.set("value6", ethereum.Value.fromUnsignedBigInt(this.value6)); + return map; + } +} + +export class Kleroscore__getJurorBalanceResult { + value0: BigInt; + value1: BigInt; + + constructor(value0: BigInt, value1: BigInt) { + this.value0 = value0; + this.value1 = value1; + } + + toMap(): TypedMap { + let map = new TypedMap(); + map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); + map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); + return map; + } +} + +export class Kleroscore__getRoundInfoResult { + value0: BigInt; + value1: BigInt; + value2: BigInt; + value3: BigInt; + value4: Array
; + + constructor( + value0: BigInt, + value1: BigInt, + value2: BigInt, + value3: BigInt, + value4: Array
+ ) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + this.value3 = value3; + this.value4 = value4; + } + + toMap(): TypedMap { + let map = new TypedMap(); + map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); + map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); + map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); + map.set("value3", ethereum.Value.fromUnsignedBigInt(this.value3)); + map.set("value4", ethereum.Value.fromAddressArray(this.value4)); + return map; + } +} + +export class Kleroscore__getSortitionSumTreeResult { + value0: BigInt; + value1: Array; + value2: Array; + + constructor(value0: BigInt, value1: Array, value2: Array) { + this.value0 = value0; + this.value1 = value1; + this.value2 = value2; + } + + toMap(): TypedMap { + let map = new TypedMap(); + map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); + map.set("value1", ethereum.Value.fromUnsignedBigIntArray(this.value1)); + map.set("value2", ethereum.Value.fromUnsignedBigIntArray(this.value2)); + return map; + } +} + +export class Kleroscore extends ethereum.SmartContract { + static bind(address: Address): Kleroscore { + return new Kleroscore("Kleroscore", address); + } + + ALPHA_DIVISOR(): BigInt { + let result = super.call("ALPHA_DIVISOR", "ALPHA_DIVISOR():(uint256)", []); + + return result[0].toBigInt(); + } + + try_ALPHA_DIVISOR(): ethereum.CallResult { + let result = super.tryCall( + "ALPHA_DIVISOR", + "ALPHA_DIVISOR():(uint256)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + MAX_STAKE_PATHS(): BigInt { + let result = super.call( + "MAX_STAKE_PATHS", + "MAX_STAKE_PATHS():(uint256)", + [] + ); + + return result[0].toBigInt(); + } + + try_MAX_STAKE_PATHS(): ethereum.CallResult { + let result = super.tryCall( + "MAX_STAKE_PATHS", + "MAX_STAKE_PATHS():(uint256)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + MIN_JURORS(): BigInt { + let result = super.call("MIN_JURORS", "MIN_JURORS():(uint256)", []); + + return result[0].toBigInt(); + } + + try_MIN_JURORS(): ethereum.CallResult { + let result = super.tryCall("MIN_JURORS", "MIN_JURORS():(uint256)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + NON_PAYABLE_AMOUNT(): BigInt { + let result = super.call( + "NON_PAYABLE_AMOUNT", + "NON_PAYABLE_AMOUNT():(uint256)", + [] + ); + + return result[0].toBigInt(); + } + + try_NON_PAYABLE_AMOUNT(): ethereum.CallResult { + let result = super.tryCall( + "NON_PAYABLE_AMOUNT", + "NON_PAYABLE_AMOUNT():(uint256)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + appealCost(_disputeID: BigInt): BigInt { + let result = super.call("appealCost", "appealCost(uint256):(uint256)", [ + ethereum.Value.fromUnsignedBigInt(_disputeID) + ]); + + return result[0].toBigInt(); + } + + try_appealCost(_disputeID: BigInt): ethereum.CallResult { + let result = super.tryCall("appealCost", "appealCost(uint256):(uint256)", [ + ethereum.Value.fromUnsignedBigInt(_disputeID) + ]); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + appealPeriod(_disputeID: BigInt): Kleroscore__appealPeriodResult { + let result = super.call( + "appealPeriod", + "appealPeriod(uint256):(uint256,uint256)", + [ethereum.Value.fromUnsignedBigInt(_disputeID)] + ); + + return new Kleroscore__appealPeriodResult( + result[0].toBigInt(), + result[1].toBigInt() + ); + } + + try_appealPeriod( + _disputeID: BigInt + ): ethereum.CallResult { + let result = super.tryCall( + "appealPeriod", + "appealPeriod(uint256):(uint256,uint256)", + [ethereum.Value.fromUnsignedBigInt(_disputeID)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue( + new Kleroscore__appealPeriodResult( + value[0].toBigInt(), + value[1].toBigInt() + ) + ); + } + + arbitrationCost(_extraData: Bytes): BigInt { + let result = super.call( + "arbitrationCost", + "arbitrationCost(bytes):(uint256)", + [ethereum.Value.fromBytes(_extraData)] + ); + + return result[0].toBigInt(); + } + + try_arbitrationCost(_extraData: Bytes): ethereum.CallResult { + let result = super.tryCall( + "arbitrationCost", + "arbitrationCost(bytes):(uint256)", + [ethereum.Value.fromBytes(_extraData)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + areVotesHidden(_subcourtID: BigInt): boolean { + let result = super.call( + "areVotesHidden", + "areVotesHidden(uint256):(bool)", + [ethereum.Value.fromUnsignedBigInt(_subcourtID)] + ); + + return result[0].toBoolean(); + } + + try_areVotesHidden(_subcourtID: BigInt): ethereum.CallResult { + let result = super.tryCall( + "areVotesHidden", + "areVotesHidden(uint256):(bool)", + [ethereum.Value.fromUnsignedBigInt(_subcourtID)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBoolean()); + } + + courts(param0: BigInt): Kleroscore__courtsResult { + let result = super.call( + "courts", + "courts(uint256):(uint96,bool,uint256,uint256,uint256,uint256,uint256)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + + return new Kleroscore__courtsResult( + result[0].toBigInt(), + result[1].toBoolean(), + result[2].toBigInt(), + result[3].toBigInt(), + result[4].toBigInt(), + result[5].toBigInt(), + result[6].toBigInt() + ); + } + + try_courts(param0: BigInt): ethereum.CallResult { + let result = super.tryCall( + "courts", + "courts(uint256):(uint96,bool,uint256,uint256,uint256,uint256,uint256)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue( + new Kleroscore__courtsResult( + value[0].toBigInt(), + value[1].toBoolean(), + value[2].toBigInt(), + value[3].toBigInt(), + value[4].toBigInt(), + value[5].toBigInt(), + value[6].toBigInt() + ) + ); + } + + currentRuling(_disputeID: BigInt): BigInt { + let result = super.call( + "currentRuling", + "currentRuling(uint256):(uint256)", + [ethereum.Value.fromUnsignedBigInt(_disputeID)] + ); + + return result[0].toBigInt(); + } + + try_currentRuling(_disputeID: BigInt): ethereum.CallResult { + let result = super.tryCall( + "currentRuling", + "currentRuling(uint256):(uint256)", + [ethereum.Value.fromUnsignedBigInt(_disputeID)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + disputeKits(param0: BigInt): Address { + let result = super.call("disputeKits", "disputeKits(uint256):(address)", [ + ethereum.Value.fromUnsignedBigInt(param0) + ]); + + return result[0].toAddress(); + } + + try_disputeKits(param0: BigInt): ethereum.CallResult
{ + let result = super.tryCall( + "disputeKits", + "disputeKits(uint256):(address)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + disputes(param0: BigInt): Kleroscore__disputesResult { + let result = super.call( + "disputes", + "disputes(uint256):(uint96,address,address,uint8,bool,uint256,uint256)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + + return new Kleroscore__disputesResult( + result[0].toBigInt(), + result[1].toAddress(), + result[2].toAddress(), + result[3].toI32(), + result[4].toBoolean(), + result[5].toBigInt(), + result[6].toBigInt() + ); + } + + try_disputes( + param0: BigInt + ): ethereum.CallResult { + let result = super.tryCall( + "disputes", + "disputes(uint256):(uint96,address,address,uint8,bool,uint256,uint256)", + [ethereum.Value.fromUnsignedBigInt(param0)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue( + new Kleroscore__disputesResult( + value[0].toBigInt(), + value[1].toAddress(), + value[2].toAddress(), + value[3].toI32(), + value[4].toBoolean(), + value[5].toBigInt(), + value[6].toBigInt() + ) + ); + } + + getCurrentPeriod(_disputeID: BigInt): i32 { + let result = super.call( + "getCurrentPeriod", + "getCurrentPeriod(uint256):(uint8)", + [ethereum.Value.fromUnsignedBigInt(_disputeID)] + ); + + return result[0].toI32(); + } + + try_getCurrentPeriod(_disputeID: BigInt): ethereum.CallResult { + let result = super.tryCall( + "getCurrentPeriod", + "getCurrentPeriod(uint256):(uint8)", + [ethereum.Value.fromUnsignedBigInt(_disputeID)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toI32()); + } + + getJurorBalance( + _juror: Address, + _subcourtID: BigInt + ): Kleroscore__getJurorBalanceResult { + let result = super.call( + "getJurorBalance", + "getJurorBalance(address,uint96):(uint256,uint256)", + [ + ethereum.Value.fromAddress(_juror), + ethereum.Value.fromUnsignedBigInt(_subcourtID) + ] + ); + + return new Kleroscore__getJurorBalanceResult( + result[0].toBigInt(), + result[1].toBigInt() + ); + } + + try_getJurorBalance( + _juror: Address, + _subcourtID: BigInt + ): ethereum.CallResult { + let result = super.tryCall( + "getJurorBalance", + "getJurorBalance(address,uint96):(uint256,uint256)", + [ + ethereum.Value.fromAddress(_juror), + ethereum.Value.fromUnsignedBigInt(_subcourtID) + ] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue( + new Kleroscore__getJurorBalanceResult( + value[0].toBigInt(), + value[1].toBigInt() + ) + ); + } + + getNumberOfRounds(_disputeID: BigInt): BigInt { + let result = super.call( + "getNumberOfRounds", + "getNumberOfRounds(uint256):(uint256)", + [ethereum.Value.fromUnsignedBigInt(_disputeID)] + ); + + return result[0].toBigInt(); + } + + try_getNumberOfRounds(_disputeID: BigInt): ethereum.CallResult { + let result = super.tryCall( + "getNumberOfRounds", + "getNumberOfRounds(uint256):(uint256)", + [ethereum.Value.fromUnsignedBigInt(_disputeID)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + getRoundInfo( + _disputeID: BigInt, + _round: BigInt + ): Kleroscore__getRoundInfoResult { + let result = super.call( + "getRoundInfo", + "getRoundInfo(uint256,uint256):(uint256,uint256,uint256,uint256,address[])", + [ + ethereum.Value.fromUnsignedBigInt(_disputeID), + ethereum.Value.fromUnsignedBigInt(_round) + ] + ); + + return new Kleroscore__getRoundInfoResult( + result[0].toBigInt(), + result[1].toBigInt(), + result[2].toBigInt(), + result[3].toBigInt(), + result[4].toAddressArray() + ); + } + + try_getRoundInfo( + _disputeID: BigInt, + _round: BigInt + ): ethereum.CallResult { + let result = super.tryCall( + "getRoundInfo", + "getRoundInfo(uint256,uint256):(uint256,uint256,uint256,uint256,address[])", + [ + ethereum.Value.fromUnsignedBigInt(_disputeID), + ethereum.Value.fromUnsignedBigInt(_round) + ] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue( + new Kleroscore__getRoundInfoResult( + value[0].toBigInt(), + value[1].toBigInt(), + value[2].toBigInt(), + value[3].toBigInt(), + value[4].toAddressArray() + ) + ); + } + + getSortitionSumTree(_key: Bytes): Kleroscore__getSortitionSumTreeResult { + let result = super.call( + "getSortitionSumTree", + "getSortitionSumTree(bytes32):(uint256,uint256[],uint256[])", + [ethereum.Value.fromFixedBytes(_key)] + ); + + return new Kleroscore__getSortitionSumTreeResult( + result[0].toBigInt(), + result[1].toBigIntArray(), + result[2].toBigIntArray() + ); + } + + try_getSortitionSumTree( + _key: Bytes + ): ethereum.CallResult { + let result = super.tryCall( + "getSortitionSumTree", + "getSortitionSumTree(bytes32):(uint256,uint256[],uint256[])", + [ethereum.Value.fromFixedBytes(_key)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue( + new Kleroscore__getSortitionSumTreeResult( + value[0].toBigInt(), + value[1].toBigIntArray(), + value[2].toBigIntArray() + ) + ); + } + + getSortitionSumTreeID(_key: Bytes, _nodeIndex: BigInt): Bytes { + let result = super.call( + "getSortitionSumTreeID", + "getSortitionSumTreeID(bytes32,uint256):(bytes32)", + [ + ethereum.Value.fromFixedBytes(_key), + ethereum.Value.fromUnsignedBigInt(_nodeIndex) + ] + ); + + return result[0].toBytes(); + } + + try_getSortitionSumTreeID( + _key: Bytes, + _nodeIndex: BigInt + ): ethereum.CallResult { + let result = super.tryCall( + "getSortitionSumTreeID", + "getSortitionSumTreeID(bytes32,uint256):(bytes32)", + [ + ethereum.Value.fromFixedBytes(_key), + ethereum.Value.fromUnsignedBigInt(_nodeIndex) + ] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBytes()); + } + + getSubcourtID(_disputeID: BigInt): BigInt { + let result = super.call( + "getSubcourtID", + "getSubcourtID(uint256):(uint256)", + [ethereum.Value.fromUnsignedBigInt(_disputeID)] + ); + + return result[0].toBigInt(); + } + + try_getSubcourtID(_disputeID: BigInt): ethereum.CallResult { + let result = super.tryCall( + "getSubcourtID", + "getSubcourtID(uint256):(uint256)", + [ethereum.Value.fromUnsignedBigInt(_disputeID)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + getTimesPerPeriod(_subcourtID: BigInt): Array { + let result = super.call( + "getTimesPerPeriod", + "getTimesPerPeriod(uint96):(uint256[4])", + [ethereum.Value.fromUnsignedBigInt(_subcourtID)] + ); + + return result[0].toBigIntArray(); + } + + try_getTimesPerPeriod( + _subcourtID: BigInt + ): ethereum.CallResult> { + let result = super.tryCall( + "getTimesPerPeriod", + "getTimesPerPeriod(uint96):(uint256[4])", + [ethereum.Value.fromUnsignedBigInt(_subcourtID)] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigIntArray()); + } + + governor(): Address { + let result = super.call("governor", "governor():(address)", []); + + return result[0].toAddress(); + } + + try_governor(): ethereum.CallResult
{ + let result = super.tryCall("governor", "governor():(address)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + isRuled(_disputeID: BigInt): boolean { + let result = super.call("isRuled", "isRuled(uint256):(bool)", [ + ethereum.Value.fromUnsignedBigInt(_disputeID) + ]); + + return result[0].toBoolean(); + } + + try_isRuled(_disputeID: BigInt): ethereum.CallResult { + let result = super.tryCall("isRuled", "isRuled(uint256):(bool)", [ + ethereum.Value.fromUnsignedBigInt(_disputeID) + ]); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBoolean()); + } + + jurorProsecutionModule(): Address { + let result = super.call( + "jurorProsecutionModule", + "jurorProsecutionModule():(address)", + [] + ); + + return result[0].toAddress(); + } + + try_jurorProsecutionModule(): ethereum.CallResult
{ + let result = super.tryCall( + "jurorProsecutionModule", + "jurorProsecutionModule():(address)", + [] + ); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } + + pinakion(): Address { + let result = super.call("pinakion", "pinakion():(address)", []); + + return result[0].toAddress(); + } + + try_pinakion(): ethereum.CallResult
{ + let result = super.tryCall("pinakion", "pinakion():(address)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toAddress()); + } +} + +export class ConstructorCall extends ethereum.Call { + get inputs(): ConstructorCall__Inputs { + return new ConstructorCall__Inputs(this); + } + + get outputs(): ConstructorCall__Outputs { + return new ConstructorCall__Outputs(this); + } +} + +export class ConstructorCall__Inputs { + _call: ConstructorCall; + + constructor(call: ConstructorCall) { + this._call = call; + } + + get _governor(): Address { + return this._call.inputValues[0].value.toAddress(); + } + + get _pinakion(): Address { + return this._call.inputValues[1].value.toAddress(); + } + + get _jurorProsecutionModule(): Address { + return this._call.inputValues[2].value.toAddress(); + } + + get _disputeKit(): Address { + return this._call.inputValues[3].value.toAddress(); + } + + get _hiddenVotes(): boolean { + return this._call.inputValues[4].value.toBoolean(); + } + + get _minStake(): BigInt { + return this._call.inputValues[5].value.toBigInt(); + } + + get _alpha(): BigInt { + return this._call.inputValues[6].value.toBigInt(); + } + + get _feeForJuror(): BigInt { + return this._call.inputValues[7].value.toBigInt(); + } + + get _jurorsForCourtJump(): BigInt { + return this._call.inputValues[8].value.toBigInt(); + } + + get _timesPerPeriod(): Array { + return this._call.inputValues[9].value.toBigIntArray(); + } + + get _sortitionSumTreeK(): BigInt { + return this._call.inputValues[10].value.toBigInt(); + } +} + +export class ConstructorCall__Outputs { + _call: ConstructorCall; + + constructor(call: ConstructorCall) { + this._call = call; + } +} + +export class AddNewDisputeKitCall extends ethereum.Call { + get inputs(): AddNewDisputeKitCall__Inputs { + return new AddNewDisputeKitCall__Inputs(this); + } + + get outputs(): AddNewDisputeKitCall__Outputs { + return new AddNewDisputeKitCall__Outputs(this); + } +} + +export class AddNewDisputeKitCall__Inputs { + _call: AddNewDisputeKitCall; + + constructor(call: AddNewDisputeKitCall) { + this._call = call; + } + + get _disputeKitAddress(): Address { + return this._call.inputValues[0].value.toAddress(); + } + + get _disputeKitID(): i32 { + return this._call.inputValues[1].value.toI32(); + } +} + +export class AddNewDisputeKitCall__Outputs { + _call: AddNewDisputeKitCall; + + constructor(call: AddNewDisputeKitCall) { + this._call = call; + } +} + +export class AppealCall extends ethereum.Call { + get inputs(): AppealCall__Inputs { + return new AppealCall__Inputs(this); + } + + get outputs(): AppealCall__Outputs { + return new AppealCall__Outputs(this); + } +} + +export class AppealCall__Inputs { + _call: AppealCall; + + constructor(call: AppealCall) { + this._call = call; + } + + get _disputeID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } +} + +export class AppealCall__Outputs { + _call: AppealCall; + + constructor(call: AppealCall) { + this._call = call; + } +} + +export class ChangeGovernorCall extends ethereum.Call { + get inputs(): ChangeGovernorCall__Inputs { + return new ChangeGovernorCall__Inputs(this); + } + + get outputs(): ChangeGovernorCall__Outputs { + return new ChangeGovernorCall__Outputs(this); + } +} + +export class ChangeGovernorCall__Inputs { + _call: ChangeGovernorCall; + + constructor(call: ChangeGovernorCall) { + this._call = call; + } + + get _governor(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class ChangeGovernorCall__Outputs { + _call: ChangeGovernorCall; + + constructor(call: ChangeGovernorCall) { + this._call = call; + } +} + +export class ChangeJurorProsecutionModuleCall extends ethereum.Call { + get inputs(): ChangeJurorProsecutionModuleCall__Inputs { + return new ChangeJurorProsecutionModuleCall__Inputs(this); + } + + get outputs(): ChangeJurorProsecutionModuleCall__Outputs { + return new ChangeJurorProsecutionModuleCall__Outputs(this); + } +} + +export class ChangeJurorProsecutionModuleCall__Inputs { + _call: ChangeJurorProsecutionModuleCall; + + constructor(call: ChangeJurorProsecutionModuleCall) { + this._call = call; + } + + get _jurorProsecutionModule(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class ChangeJurorProsecutionModuleCall__Outputs { + _call: ChangeJurorProsecutionModuleCall; + + constructor(call: ChangeJurorProsecutionModuleCall) { + this._call = call; + } +} + +export class ChangePinakionCall extends ethereum.Call { + get inputs(): ChangePinakionCall__Inputs { + return new ChangePinakionCall__Inputs(this); + } + + get outputs(): ChangePinakionCall__Outputs { + return new ChangePinakionCall__Outputs(this); + } +} + +export class ChangePinakionCall__Inputs { + _call: ChangePinakionCall; + + constructor(call: ChangePinakionCall) { + this._call = call; + } + + get _pinakion(): Address { + return this._call.inputValues[0].value.toAddress(); + } +} + +export class ChangePinakionCall__Outputs { + _call: ChangePinakionCall; + + constructor(call: ChangePinakionCall) { + this._call = call; + } +} + +export class ChangeSubcourtAlphaCall extends ethereum.Call { + get inputs(): ChangeSubcourtAlphaCall__Inputs { + return new ChangeSubcourtAlphaCall__Inputs(this); + } + + get outputs(): ChangeSubcourtAlphaCall__Outputs { + return new ChangeSubcourtAlphaCall__Outputs(this); + } +} + +export class ChangeSubcourtAlphaCall__Inputs { + _call: ChangeSubcourtAlphaCall; + + constructor(call: ChangeSubcourtAlphaCall) { + this._call = call; + } + + get _subcourtID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _alpha(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } +} + +export class ChangeSubcourtAlphaCall__Outputs { + _call: ChangeSubcourtAlphaCall; + + constructor(call: ChangeSubcourtAlphaCall) { + this._call = call; + } +} + +export class ChangeSubcourtJurorFeeCall extends ethereum.Call { + get inputs(): ChangeSubcourtJurorFeeCall__Inputs { + return new ChangeSubcourtJurorFeeCall__Inputs(this); + } + + get outputs(): ChangeSubcourtJurorFeeCall__Outputs { + return new ChangeSubcourtJurorFeeCall__Outputs(this); + } +} + +export class ChangeSubcourtJurorFeeCall__Inputs { + _call: ChangeSubcourtJurorFeeCall; + + constructor(call: ChangeSubcourtJurorFeeCall) { + this._call = call; + } + + get _subcourtID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _feeForJuror(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } +} + +export class ChangeSubcourtJurorFeeCall__Outputs { + _call: ChangeSubcourtJurorFeeCall; + + constructor(call: ChangeSubcourtJurorFeeCall) { + this._call = call; + } +} + +export class ChangeSubcourtJurorsForJumpCall extends ethereum.Call { + get inputs(): ChangeSubcourtJurorsForJumpCall__Inputs { + return new ChangeSubcourtJurorsForJumpCall__Inputs(this); + } + + get outputs(): ChangeSubcourtJurorsForJumpCall__Outputs { + return new ChangeSubcourtJurorsForJumpCall__Outputs(this); + } +} + +export class ChangeSubcourtJurorsForJumpCall__Inputs { + _call: ChangeSubcourtJurorsForJumpCall; + + constructor(call: ChangeSubcourtJurorsForJumpCall) { + this._call = call; + } + + get _subcourtID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _jurorsForCourtJump(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } +} + +export class ChangeSubcourtJurorsForJumpCall__Outputs { + _call: ChangeSubcourtJurorsForJumpCall; + + constructor(call: ChangeSubcourtJurorsForJumpCall) { + this._call = call; + } +} + +export class ChangeSubcourtMinStakeCall extends ethereum.Call { + get inputs(): ChangeSubcourtMinStakeCall__Inputs { + return new ChangeSubcourtMinStakeCall__Inputs(this); + } + + get outputs(): ChangeSubcourtMinStakeCall__Outputs { + return new ChangeSubcourtMinStakeCall__Outputs(this); + } +} + +export class ChangeSubcourtMinStakeCall__Inputs { + _call: ChangeSubcourtMinStakeCall; + + constructor(call: ChangeSubcourtMinStakeCall) { + this._call = call; + } + + get _subcourtID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _minStake(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } +} + +export class ChangeSubcourtMinStakeCall__Outputs { + _call: ChangeSubcourtMinStakeCall; + + constructor(call: ChangeSubcourtMinStakeCall) { + this._call = call; + } +} + +export class ChangeSubcourtTimesPerPeriodCall extends ethereum.Call { + get inputs(): ChangeSubcourtTimesPerPeriodCall__Inputs { + return new ChangeSubcourtTimesPerPeriodCall__Inputs(this); + } + + get outputs(): ChangeSubcourtTimesPerPeriodCall__Outputs { + return new ChangeSubcourtTimesPerPeriodCall__Outputs(this); + } +} + +export class ChangeSubcourtTimesPerPeriodCall__Inputs { + _call: ChangeSubcourtTimesPerPeriodCall; + + constructor(call: ChangeSubcourtTimesPerPeriodCall) { + this._call = call; + } + + get _subcourtID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _timesPerPeriod(): Array { + return this._call.inputValues[1].value.toBigIntArray(); + } +} + +export class ChangeSubcourtTimesPerPeriodCall__Outputs { + _call: ChangeSubcourtTimesPerPeriodCall; + + constructor(call: ChangeSubcourtTimesPerPeriodCall) { + this._call = call; + } +} + +export class CreateDisputeCall extends ethereum.Call { + get inputs(): CreateDisputeCall__Inputs { + return new CreateDisputeCall__Inputs(this); + } + + get outputs(): CreateDisputeCall__Outputs { + return new CreateDisputeCall__Outputs(this); + } +} + +export class CreateDisputeCall__Inputs { + _call: CreateDisputeCall; + + constructor(call: CreateDisputeCall) { + this._call = call; + } + + get _numberOfChoices(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _extraData(): Bytes { + return this._call.inputValues[1].value.toBytes(); + } +} + +export class CreateDisputeCall__Outputs { + _call: CreateDisputeCall; + + constructor(call: CreateDisputeCall) { + this._call = call; + } + + get disputeID(): BigInt { + return this._call.outputValues[0].value.toBigInt(); + } +} + +export class CreateSubcourtCall extends ethereum.Call { + get inputs(): CreateSubcourtCall__Inputs { + return new CreateSubcourtCall__Inputs(this); + } + + get outputs(): CreateSubcourtCall__Outputs { + return new CreateSubcourtCall__Outputs(this); + } +} + +export class CreateSubcourtCall__Inputs { + _call: CreateSubcourtCall; + + constructor(call: CreateSubcourtCall) { + this._call = call; + } + + get _parent(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _hiddenVotes(): boolean { + return this._call.inputValues[1].value.toBoolean(); + } + + get _minStake(): BigInt { + return this._call.inputValues[2].value.toBigInt(); + } + + get _alpha(): BigInt { + return this._call.inputValues[3].value.toBigInt(); + } + + get _feeForJuror(): BigInt { + return this._call.inputValues[4].value.toBigInt(); + } + + get _jurorsForCourtJump(): BigInt { + return this._call.inputValues[5].value.toBigInt(); + } + + get _timesPerPeriod(): Array { + return this._call.inputValues[6].value.toBigIntArray(); + } + + get _sortitionSumTreeK(): BigInt { + return this._call.inputValues[7].value.toBigInt(); + } + + get _supportedDisputeKits(): BigInt { + return this._call.inputValues[8].value.toBigInt(); + } +} + +export class CreateSubcourtCall__Outputs { + _call: CreateSubcourtCall; + + constructor(call: CreateSubcourtCall) { + this._call = call; + } +} + +export class DrawCall extends ethereum.Call { + get inputs(): DrawCall__Inputs { + return new DrawCall__Inputs(this); + } + + get outputs(): DrawCall__Outputs { + return new DrawCall__Outputs(this); + } +} + +export class DrawCall__Inputs { + _call: DrawCall; + + constructor(call: DrawCall) { + this._call = call; + } + + get _disputeID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _iterations(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } +} + +export class DrawCall__Outputs { + _call: DrawCall; + + constructor(call: DrawCall) { + this._call = call; + } +} + +export class ExecuteCall extends ethereum.Call { + get inputs(): ExecuteCall__Inputs { + return new ExecuteCall__Inputs(this); + } + + get outputs(): ExecuteCall__Outputs { + return new ExecuteCall__Outputs(this); + } +} + +export class ExecuteCall__Inputs { + _call: ExecuteCall; + + constructor(call: ExecuteCall) { + this._call = call; + } + + get _disputeID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _appeal(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } + + get _iterations(): BigInt { + return this._call.inputValues[2].value.toBigInt(); + } +} + +export class ExecuteCall__Outputs { + _call: ExecuteCall; + + constructor(call: ExecuteCall) { + this._call = call; + } +} + +export class ExecuteGovernorProposalCall extends ethereum.Call { + get inputs(): ExecuteGovernorProposalCall__Inputs { + return new ExecuteGovernorProposalCall__Inputs(this); + } + + get outputs(): ExecuteGovernorProposalCall__Outputs { + return new ExecuteGovernorProposalCall__Outputs(this); + } +} + +export class ExecuteGovernorProposalCall__Inputs { + _call: ExecuteGovernorProposalCall; + + constructor(call: ExecuteGovernorProposalCall) { + this._call = call; + } + + get _destination(): Address { + return this._call.inputValues[0].value.toAddress(); + } + + get _amount(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } + + get _data(): Bytes { + return this._call.inputValues[2].value.toBytes(); + } +} + +export class ExecuteGovernorProposalCall__Outputs { + _call: ExecuteGovernorProposalCall; + + constructor(call: ExecuteGovernorProposalCall) { + this._call = call; + } +} + +export class ExecuteRulingCall extends ethereum.Call { + get inputs(): ExecuteRulingCall__Inputs { + return new ExecuteRulingCall__Inputs(this); + } + + get outputs(): ExecuteRulingCall__Outputs { + return new ExecuteRulingCall__Outputs(this); + } +} + +export class ExecuteRulingCall__Inputs { + _call: ExecuteRulingCall; + + constructor(call: ExecuteRulingCall) { + this._call = call; + } + + get _disputeID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } +} + +export class ExecuteRulingCall__Outputs { + _call: ExecuteRulingCall; + + constructor(call: ExecuteRulingCall) { + this._call = call; + } +} + +export class PassPeriodCall extends ethereum.Call { + get inputs(): PassPeriodCall__Inputs { + return new PassPeriodCall__Inputs(this); + } + + get outputs(): PassPeriodCall__Outputs { + return new PassPeriodCall__Outputs(this); + } +} + +export class PassPeriodCall__Inputs { + _call: PassPeriodCall; + + constructor(call: PassPeriodCall) { + this._call = call; + } + + get _disputeID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } +} + +export class PassPeriodCall__Outputs { + _call: PassPeriodCall; + + constructor(call: PassPeriodCall) { + this._call = call; + } +} + +export class SetDisputeKitsCall extends ethereum.Call { + get inputs(): SetDisputeKitsCall__Inputs { + return new SetDisputeKitsCall__Inputs(this); + } + + get outputs(): SetDisputeKitsCall__Outputs { + return new SetDisputeKitsCall__Outputs(this); + } +} + +export class SetDisputeKitsCall__Inputs { + _call: SetDisputeKitsCall; + + constructor(call: SetDisputeKitsCall) { + this._call = call; + } + + get _subcourtID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _disputeKitIDs(): Array { + return this._call.inputValues[1].value.toI32Array(); + } + + get _enable(): boolean { + return this._call.inputValues[2].value.toBoolean(); + } +} + +export class SetDisputeKitsCall__Outputs { + _call: SetDisputeKitsCall; + + constructor(call: SetDisputeKitsCall) { + this._call = call; + } +} + +export class SetStakeCall extends ethereum.Call { + get inputs(): SetStakeCall__Inputs { + return new SetStakeCall__Inputs(this); + } + + get outputs(): SetStakeCall__Outputs { + return new SetStakeCall__Outputs(this); + } +} + +export class SetStakeCall__Inputs { + _call: SetStakeCall; + + constructor(call: SetStakeCall) { + this._call = call; + } + + get _subcourtID(): BigInt { + return this._call.inputValues[0].value.toBigInt(); + } + + get _stake(): BigInt { + return this._call.inputValues[1].value.toBigInt(); + } +} + +export class SetStakeCall__Outputs { + _call: SetStakeCall; + + constructor(call: SetStakeCall) { + this._call = call; + } +} diff --git a/subgraph/generated/schema.ts b/subgraph/generated/schema.ts new file mode 100644 index 000000000..149762c3f --- /dev/null +++ b/subgraph/generated/schema.ts @@ -0,0 +1,75 @@ +// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { + TypedMap, + Entity, + Value, + ValueKind, + store, + Bytes, + BigInt, + BigDecimal +} from "@graphprotocol/graph-ts"; + +export class ExampleEntity extends Entity { + constructor(id: string) { + super(); + this.set("id", Value.fromString(id)); + + this.set("count", Value.fromBigInt(BigInt.zero())); + this.set("_disputeID", Value.fromBigInt(BigInt.zero())); + this.set("_arbitrable", Value.fromBytes(Bytes.empty())); + } + + save(): void { + let id = this.get("id"); + assert(id != null, "Cannot save ExampleEntity entity without an ID"); + if (id) { + assert( + id.kind == ValueKind.STRING, + `Entities of type ExampleEntity must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` + ); + store.set("ExampleEntity", id.toString(), this); + } + } + + static load(id: string): ExampleEntity | null { + return changetype(store.get("ExampleEntity", id)); + } + + get id(): string { + let value = this.get("id"); + return value!.toString(); + } + + set id(value: string) { + this.set("id", Value.fromString(value)); + } + + get count(): BigInt { + let value = this.get("count"); + return value!.toBigInt(); + } + + set count(value: BigInt) { + this.set("count", Value.fromBigInt(value)); + } + + get _disputeID(): BigInt { + let value = this.get("_disputeID"); + return value!.toBigInt(); + } + + set _disputeID(value: BigInt) { + this.set("_disputeID", Value.fromBigInt(value)); + } + + get _arbitrable(): Bytes { + let value = this.get("_arbitrable"); + return value!.toBytes(); + } + + set _arbitrable(value: Bytes) { + this.set("_arbitrable", Value.fromBytes(value)); + } +} diff --git a/subgraph/package.json b/subgraph/package.json new file mode 100644 index 000000000..fe501bc1d --- /dev/null +++ b/subgraph/package.json @@ -0,0 +1,16 @@ +{ + "name": "KlerosCore", + "license": "UNLICENSED", + "scripts": { + "codegen": "graph codegen", + "build": "graph build", + "deploy": "graph deploy --node https://api.studio.thegraph.com/deploy/ KlerosCore", + "create-local": "graph create --node http://localhost:8020/ KlerosCore", + "remove-local": "graph remove --node http://localhost:8020/ KlerosCore", + "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 KlerosCore" + }, + "dependencies": { + "@graphprotocol/graph-cli": "0.28.0", + "@graphprotocol/graph-ts": "0.26.0" + } +} diff --git a/subgraph/schema.graphql b/subgraph/schema.graphql new file mode 100644 index 000000000..3fd4cf712 --- /dev/null +++ b/subgraph/schema.graphql @@ -0,0 +1,6 @@ +type ExampleEntity @entity { + id: ID! + count: BigInt! + _disputeID: BigInt! # uint256 + _arbitrable: Bytes! # address +} diff --git a/subgraph/src/mapping.ts b/subgraph/src/mapping.ts new file mode 100644 index 000000000..c65771a02 --- /dev/null +++ b/subgraph/src/mapping.ts @@ -0,0 +1,89 @@ +import { BigInt } from "@graphprotocol/graph-ts" +import { + Kleroscore, + AppealDecision, + AppealPossible, + DisputeCreation, + Draw, + NewPeriod, + StakeSet, + TokenAndETHShift +} from "../generated/Kleroscore/Kleroscore" +import { ExampleEntity } from "../generated/schema" + +export function handleAppealDecision(event: AppealDecision): void { + // Entities can be loaded from the store using a string ID; this ID + // needs to be unique across all entities of the same type + let entity = ExampleEntity.load(event.transaction.from.toHex()) + + // Entities only exist after they have been saved to the store; + // `null` checks allow to create entities on demand + if (!entity) { + entity = new ExampleEntity(event.transaction.from.toHex()) + + // Entity fields can be set using simple assignments + entity.count = BigInt.fromI32(0) + } + + // BigInt and BigDecimal math are supported + entity.count = entity.count + BigInt.fromI32(1) + + // Entity fields can be set based on event parameters + entity._disputeID = event.params._disputeID + entity._arbitrable = event.params._arbitrable + + // Entities can be written to the store with `.save()` + entity.save() + + // Note: If a handler doesn't require existing field values, it is faster + // _not_ to load the entity from the store. Instead, create it fresh with + // `new Entity(...)`, set the fields that should be updated and save the + // entity back to the store. Fields that were not set or unset remain + // unchanged, allowing for partial updates to be applied. + + // It is also possible to access smart contracts from mappings. For + // example, the contract that has emitted the event can be connected to + // with: + // + // let contract = Contract.bind(event.address) + // + // The following functions can then be called on this contract to access + // state variables and other data: + // + // - contract.ALPHA_DIVISOR(...) + // - contract.MAX_STAKE_PATHS(...) + // - contract.MIN_JURORS(...) + // - contract.NON_PAYABLE_AMOUNT(...) + // - contract.appealCost(...) + // - contract.appealPeriod(...) + // - contract.arbitrationCost(...) + // - contract.areVotesHidden(...) + // - contract.courts(...) + // - contract.currentRuling(...) + // - contract.disputeKits(...) + // - contract.disputes(...) + // - contract.getCurrentPeriod(...) + // - contract.getJurorBalance(...) + // - contract.getNumberOfRounds(...) + // - contract.getRoundInfo(...) + // - contract.getSortitionSumTree(...) + // - contract.getSortitionSumTreeID(...) + // - contract.getSubcourtID(...) + // - contract.getTimesPerPeriod(...) + // - contract.governor(...) + // - contract.isRuled(...) + // - contract.jurorProsecutionModule(...) + // - contract.pinakion(...) +} + +export function handleAppealPossible(event: AppealPossible): void {} + +export function handleDisputeCreation(event: DisputeCreation): void {} + +export function handleDraw(event: Draw): void {} + +export function handleNewPeriod(event: NewPeriod): void {} + +export function handleStakeSet(event: StakeSet): void {} + +export function handleTokenAndETHShift(event: TokenAndETHShift): void {} diff --git a/subgraph/subgraph.yaml b/subgraph/subgraph.yaml new file mode 100644 index 000000000..42aca24d7 --- /dev/null +++ b/subgraph/subgraph.yaml @@ -0,0 +1,41 @@ +specVersion: 0.0.2 +schema: + file: ./schema.graphql +dataSources: + - kind: ethereum + name: Kleroscore + network: arbitrum-rinkeby + source: + address: "0xd08452AEE7ab5bE3BF6733BA0d3F0CFdaf060Aa2" + abi: Kleroscore + mapping: + kind: ethereum/events + apiVersion: 0.0.5 + language: wasm/assemblyscript + entities: + - AppealDecision + - AppealPossible + - DisputeCreation + - Draw + - NewPeriod + - StakeSet + - TokenAndETHShift + abis: + - name: Kleroscore + file: ./abis/Kleroscore.json + eventHandlers: + - event: AppealDecision(indexed uint256,indexed address) + handler: handleAppealDecision + - event: AppealPossible(indexed uint256,indexed address) + handler: handleAppealPossible + - event: DisputeCreation(indexed uint256,indexed address) + handler: handleDisputeCreation + - event: Draw(indexed address,indexed uint256,uint256,uint256) + handler: handleDraw + - event: NewPeriod(indexed uint256,uint8) + handler: handleNewPeriod + - event: StakeSet(indexed address,uint256,uint256,uint256) + handler: handleStakeSet + - event: TokenAndETHShift(indexed address,indexed uint256,int256,int256) + handler: handleTokenAndETHShift + file: ./src/mapping.ts diff --git a/subgraph/tsconfig.json b/subgraph/tsconfig.json new file mode 100644 index 000000000..61e440c6e --- /dev/null +++ b/subgraph/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "@graphprotocol/graph-ts/types/tsconfig.base.json", + "include": [ + "src" + ] +} diff --git a/yarn.lock b/yarn.lock index 01dc0a5f4..4c89a2ae8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -231,7 +231,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.11.1, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2": +"@babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.11.1, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.9.2": version: 7.17.7 resolution: "@babel/runtime@npm:7.17.7" dependencies: @@ -1563,6 +1563,50 @@ __metadata: languageName: node linkType: hard +"@graphprotocol/graph-cli@npm:0.28.0": + version: 0.28.0 + resolution: "@graphprotocol/graph-cli@npm:0.28.0" + dependencies: + assemblyscript: 0.19.10 + binary-install-raw: 0.0.13 + chalk: 3.0.0 + chokidar: 3.5.1 + debug: 4.1.1 + docker-compose: 0.23.4 + dockerode: 2.5.8 + fs-extra: 9.0.0 + glob: 7.1.6 + gluegun: "git+https://github.com/edgeandnode/gluegun.git#v4.3.1-pin-colors-dep" + graphql: 15.5.0 + immutable: 3.8.2 + ipfs-http-client: 34.0.0 + jayson: 3.2.0 + js-yaml: 3.13.1 + node-fetch: 2.6.0 + pkginfo: 0.4.1 + prettier: 1.19.1 + request: 2.88.2 + semver: 7.3.5 + sync-request: 6.1.0 + tmp-promise: 3.0.2 + web3-eth-abi: 1.7.0 + which: 2.0.2 + yaml: 1.9.2 + bin: + graph: bin/graph + checksum: 5d1e4ecd4f452fffcaf74fa2a31ed68744eb4a936611c82cdf56bd16a7f362c3d2146491880633a2d68c4e06e05514c845250bad4b8c337140d16d29ad45de63 + languageName: node + linkType: hard + +"@graphprotocol/graph-ts@npm:0.26.0": + version: 0.26.0 + resolution: "@graphprotocol/graph-ts@npm:0.26.0" + dependencies: + assemblyscript: 0.19.10 + checksum: 3edb53b0590d67638d0862ee1a8fd4e5157eed8043f82f15a597a9b675839099b346a57aeff4bfe7aabc6999bde4b8d47f1724e5ee09e8db62ac99bd8bd0b97f + languageName: node + linkType: hard + "@humanwhocodes/config-array@npm:^0.5.0": version: 0.5.0 resolution: "@humanwhocodes/config-array@npm:0.5.0" @@ -2935,6 +2979,15 @@ __metadata: languageName: node linkType: hard +"@types/connect@npm:^3.4.32": + version: 3.4.35 + resolution: "@types/connect@npm:3.4.35" + dependencies: + "@types/node": "*" + checksum: fe81351470f2d3165e8b12ce33542eef89ea893e36dd62e8f7d72566dfb7e448376ae962f9f3ea888547ce8b55a40020ca0e01d637fab5d99567673084542641 + languageName: node + linkType: hard + "@types/eslint-scope@npm:^3.7.3": version: 3.7.3 resolution: "@types/eslint-scope@npm:3.7.3" @@ -2962,6 +3015,17 @@ __metadata: languageName: node linkType: hard +"@types/express-serve-static-core@npm:^4.16.9": + version: 4.17.28 + resolution: "@types/express-serve-static-core@npm:4.17.28" + dependencies: + "@types/node": "*" + "@types/qs": "*" + "@types/range-parser": "*" + checksum: 826489811a5b371c10f02443b4ca894ffc05813bfdf2b60c224f5c18ac9a30a2e518cb9ef9fdfcaa2a1bb17f8bfa4ed1859ccdb252e879c9276271b4ee2df5a9 + languageName: node + linkType: hard + "@types/form-data@npm:0.0.33": version: 0.0.33 resolution: "@types/form-data@npm:0.0.33" @@ -3039,6 +3103,13 @@ __metadata: languageName: node linkType: hard +"@types/lodash@npm:^4.14.139": + version: 4.14.180 + resolution: "@types/lodash@npm:4.14.180" + checksum: fc42ae3473695cac6e91553f832fef8eb51a31c1c0381cafa81b00dc3efe18e279786bdda77caf0b90a8340ba2ba7aa46ae6541d69870565f775d04c89128bc1 + languageName: node + linkType: hard + "@types/lru-cache@npm:^5.1.0": version: 5.1.1 resolution: "@types/lru-cache@npm:5.1.1" @@ -3100,7 +3171,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^12.12.6": +"@types/node@npm:^12.12.6, @types/node@npm:^12.7.7": version: 12.20.47 resolution: "@types/node@npm:12.20.47" checksum: 97487af02fada4342e1bd47f9c9ebf601c12b85cbf17056ba73a315339ae996490403f2d4d1d799d8078cfe43a59e33370b4a5ae2d4fb79dd02359f4691934b4 @@ -3158,13 +3229,20 @@ __metadata: languageName: node linkType: hard -"@types/qs@npm:^6.2.31, @types/qs@npm:^6.9.7": +"@types/qs@npm:*, @types/qs@npm:^6.2.31, @types/qs@npm:^6.9.7": version: 6.9.7 resolution: "@types/qs@npm:6.9.7" checksum: 7fd6f9c25053e9b5bb6bc9f9f76c1d89e6c04f7707a7ba0e44cc01f17ef5284adb82f230f542c2d5557d69407c9a40f0f3515e8319afd14e1e16b5543ac6cdba languageName: node linkType: hard +"@types/range-parser@npm:*": + version: 1.2.4 + resolution: "@types/range-parser@npm:1.2.4" + checksum: b7c0dfd5080a989d6c8bb0b6750fc0933d9acabeb476da6fe71d8bdf1ab65e37c136169d84148034802f48378ab94e3c37bb4ef7656b2bec2cb9c0f8d4146a95 + languageName: node + linkType: hard + "@types/react-dom@npm:^17.0.11": version: 17.0.13 resolution: "@types/react-dom@npm:17.0.13" @@ -3681,7 +3759,19 @@ __metadata: languageName: node linkType: hard -"JSONStream@npm:^1.0.4": +"JSONStream@npm:1.3.2": + version: 1.3.2 + resolution: "JSONStream@npm:1.3.2" + dependencies: + jsonparse: ^1.2.0 + through: ">=2.2.7 <3" + bin: + JSONStream: ./bin.js + checksum: d83b86f846eaeba7b947181245b977bb7e32c49e25d210234ecbf6b2d9128924610224e150558deeb65d063b07b8c28e5a1a4ab8daeb89d4c34e718047f046fd + languageName: node + linkType: hard + +"JSONStream@npm:^1.0.4, JSONStream@npm:^1.3.1": version: 1.3.5 resolution: "JSONStream@npm:1.3.5" dependencies: @@ -3693,6 +3783,15 @@ __metadata: languageName: node linkType: hard +"KlerosCore@workspace:subgraph": + version: 0.0.0-use.local + resolution: "KlerosCore@workspace:subgraph" + dependencies: + "@graphprotocol/graph-cli": 0.28.0 + "@graphprotocol/graph-ts": 0.26.0 + languageName: unknown + linkType: soft + "abbrev@npm:1": version: 1.1.1 resolution: "abbrev@npm:1.1.1" @@ -3966,6 +4065,13 @@ __metadata: languageName: node linkType: hard +"ansi-colors@npm:^3.2.1": + version: 3.2.4 + resolution: "ansi-colors@npm:3.2.4" + checksum: 026c51880e9f8eb59b112669a87dbea4469939ff94b131606303bbd697438a6691b16b9db3027aa9bf132a244214e83ab1508b998496a34d2aea5b437ac9e62d + languageName: node + linkType: hard + "ansi-escapes@npm:^3.2.0": version: 3.2.0 resolution: "ansi-escapes@npm:3.2.0" @@ -4061,6 +4167,23 @@ __metadata: languageName: node linkType: hard +"apisauce@npm:^1.0.1": + version: 1.1.5 + resolution: "apisauce@npm:1.1.5" + dependencies: + axios: ^0.21.2 + ramda: ^0.25.0 + checksum: 4bac8117b484616c82e102d238580f835ffabee15da4527e845d091c12618f3b85293fb96c2357a119efede4ac1695d1ec78cc2ae5e3774f1522e1e1b1852365 + languageName: node + linkType: hard + +"app-module-path@npm:^2.2.0": + version: 2.2.0 + resolution: "app-module-path@npm:2.2.0" + checksum: b52aa49cfa809efbad41b514222e8ef3f8ee9e147f5eccf79280b45eddcc61f7aeb302b0049474e3f42072dd53a28348c57dd96f36cd461d2e31cc8ab1ef56b5 + languageName: node + linkType: hard + "aproba@npm:^1.0.3 || ^2.0.0": version: 2.0.0 resolution: "aproba@npm:2.0.0" @@ -4252,7 +4375,14 @@ __metadata: languageName: node linkType: hard -"asn1.js@npm:^5.2.0": +"asmcrypto.js@npm:^2.3.2": + version: 2.3.2 + resolution: "asmcrypto.js@npm:2.3.2" + checksum: d61722be99d51c9a09093166412354845fb6ba278374b0cccfb33b18ad9edd26019ced171ae286b1d55c57edd8702fe87d2eec096f20fb2080ee52f8ba4b995e + languageName: node + linkType: hard + +"asn1.js@npm:^5.0.1, asn1.js@npm:^5.2.0": version: 5.4.1 resolution: "asn1.js@npm:5.4.1" dependencies: @@ -4273,6 +4403,19 @@ __metadata: languageName: node linkType: hard +"assemblyscript@npm:0.19.10": + version: 0.19.10 + resolution: "assemblyscript@npm:0.19.10" + dependencies: + binaryen: 101.0.0-nightly.20210723 + long: ^4.0.0 + bin: + asc: bin/asc + asinit: bin/asinit + checksum: d4087bcbae402eb0e972a78d8dfee607b2b51f4b29fcee5359f4db3052912ec12492a8714916bed8424f7f495f9357c7c6ab2482ba1d4ea4a44c55a86df5a67c + languageName: node + linkType: hard + "assert-plus@npm:1.0.0, assert-plus@npm:^1.0.0": version: 1.0.0 resolution: "assert-plus@npm:1.0.0" @@ -4347,7 +4490,7 @@ __metadata: languageName: node linkType: hard -"async@npm:^2.0.1, async@npm:^2.1.2, async@npm:^2.4.0, async@npm:^2.5.0, async@npm:^2.6.1": +"async@npm:^2.0.1, async@npm:^2.1.2, async@npm:^2.4.0, async@npm:^2.5.0, async@npm:^2.6.1, async@npm:^2.6.2, async@npm:^2.6.3": version: 2.6.3 resolution: "async@npm:2.6.3" dependencies: @@ -4400,7 +4543,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^0.21.1": +"axios@npm:^0.21.1, axios@npm:^0.21.2": version: 0.21.4 resolution: "axios@npm:0.21.4" dependencies: @@ -5151,6 +5294,26 @@ __metadata: languageName: node linkType: hard +"binary-install-raw@npm:0.0.13": + version: 0.0.13 + resolution: "binary-install-raw@npm:0.0.13" + dependencies: + axios: ^0.21.1 + rimraf: ^3.0.2 + tar: ^6.1.0 + checksum: f18515976237100459b4e2983832c941421ed8767c7fbc0ca716aa96210ccdd6c8ae9fdb9e0c39099248ebd8a3f4653560cb0b655192bb3b4efa1f7be204343a + languageName: node + linkType: hard + +"binaryen@npm:101.0.0-nightly.20210723": + version: 101.0.0-nightly.20210723 + resolution: "binaryen@npm:101.0.0-nightly.20210723" + bin: + wasm-opt: bin/wasm-opt + checksum: b1f7cc8e9fb4f1530e9454b5ea6deba17e2d863cea4efc6d0ba1b2af2325e9080c29df0ffeaf9708d455705a629a6a4fbef0ac29ed789a4e316b4c1437879f57 + languageName: node + linkType: hard + "bindings@npm:^1.5.0": version: 1.5.0 resolution: "bindings@npm:1.5.0" @@ -5182,6 +5345,36 @@ __metadata: languageName: node linkType: hard +"bl@npm:^1.0.0": + version: 1.2.3 + resolution: "bl@npm:1.2.3" + dependencies: + readable-stream: ^2.3.5 + safe-buffer: ^5.1.1 + checksum: 123f097989ce2fa9087ce761cd41176aaaec864e28f7dfe5c7dab8ae16d66d9844f849c3ad688eb357e3c5e4f49b573e3c0780bb8bc937206735a3b6f8569a5f + languageName: node + linkType: hard + +"bl@npm:^3.0.0": + version: 3.0.1 + resolution: "bl@npm:3.0.1" + dependencies: + readable-stream: ^3.0.1 + checksum: c94e9f44b81baae0b916fefcb095bf2829c132a23b36a338e9a948616fdffbd4f6c73c692e87d96cffdee4d45f0b8e64929ecc76e9cc592a01d2bd22adadf76e + languageName: node + linkType: hard + +"bl@npm:^4.0.3": + version: 4.1.0 + resolution: "bl@npm:4.1.0" + dependencies: + buffer: ^5.5.0 + inherits: ^2.0.4 + readable-stream: ^3.4.0 + checksum: 9e8521fa7e83aa9427c6f8ccdcba6e8167ef30cc9a22df26effcc5ab682ef91d2cbc23a239f945d099289e4bbcfae7a192e9c28c84c6202e710a0dfec3722662 + languageName: node + linkType: hard + "blakejs@npm:^1.1.0": version: 1.1.1 resolution: "blakejs@npm:1.1.1" @@ -5242,6 +5435,21 @@ __metadata: languageName: node linkType: hard +"borc@npm:^2.1.2": + version: 2.1.2 + resolution: "borc@npm:2.1.2" + dependencies: + bignumber.js: ^9.0.0 + buffer: ^5.5.0 + commander: ^2.15.0 + ieee754: ^1.1.13 + iso-url: ~0.4.7 + json-text-sequence: ~0.1.0 + readable-stream: ^3.6.0 + checksum: 1914720baf2dd980edc82a957d1901b8cc80746c0482892fe747558c47c452127a1359104f01b3df9510ae8bb7954273c52796329f8f1445ca04415e05c8e9e2 + languageName: node + linkType: hard + "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -5400,7 +5608,7 @@ __metadata: languageName: node linkType: hard -"bs58@npm:^4.0.0": +"bs58@npm:^4.0.0, bs58@npm:^4.0.1": version: 4.0.1 resolution: "bs58@npm:4.0.1" dependencies: @@ -5420,6 +5628,30 @@ __metadata: languageName: node linkType: hard +"buffer-alloc-unsafe@npm:^1.1.0": + version: 1.1.0 + resolution: "buffer-alloc-unsafe@npm:1.1.0" + checksum: c5e18bf51f67754ec843c9af3d4c005051aac5008a3992938dda1344e5cfec77c4b02b4ca303644d1e9a6e281765155ce6356d85c6f5ccc5cd21afc868def396 + languageName: node + linkType: hard + +"buffer-alloc@npm:^1.2.0": + version: 1.2.0 + resolution: "buffer-alloc@npm:1.2.0" + dependencies: + buffer-alloc-unsafe: ^1.1.0 + buffer-fill: ^1.0.0 + checksum: 560cd27f3cbe73c614867da373407d4506309c62fe18de45a1ce191f3785ec6ca2488d802ff82065798542422980ca25f903db078c57822218182c37c3576df5 + languageName: node + linkType: hard + +"buffer-fill@npm:^1.0.0": + version: 1.0.0 + resolution: "buffer-fill@npm:1.0.0" + checksum: c29b4723ddeab01e74b5d3b982a0c6828f2ded49cef049ddca3dac661c874ecdbcecb5dd8380cf0f4adbeb8cff90a7de724126750a1f1e5ebd4eb6c59a1315b1 + languageName: node + linkType: hard + "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -5450,7 +5682,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.0.5, buffer@npm:^5.2.1, buffer@npm:^5.5.0, buffer@npm:^5.6.0": +"buffer@npm:^5.0.5, buffer@npm:^5.2.1, buffer@npm:^5.4.2, buffer@npm:^5.4.3, buffer@npm:^5.5.0, buffer@npm:^5.6.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -5460,6 +5692,16 @@ __metadata: languageName: node linkType: hard +"buffer@npm:^6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" + dependencies: + base64-js: ^1.3.1 + ieee754: ^1.2.1 + checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 + languageName: node + linkType: hard + "bufferutil@npm:^4.0.1": version: 4.0.6 resolution: "bufferutil@npm:4.0.6" @@ -5470,6 +5712,13 @@ __metadata: languageName: node linkType: hard +"builtin-status-codes@npm:^3.0.0": + version: 3.0.0 + resolution: "builtin-status-codes@npm:3.0.0" + checksum: 1119429cf4b0d57bf76b248ad6f529167d343156ebbcc4d4e4ad600484f6bc63002595cbb61b67ad03ce55cd1d3c4711c03bbf198bf24653b8392420482f3773 + languageName: node + linkType: hard + "bytes@npm:3.1.2": version: 3.1.2 resolution: "bytes@npm:3.1.2" @@ -5712,6 +5961,16 @@ __metadata: languageName: node linkType: hard +"chalk@npm:3.0.0, chalk@npm:^3.0.0": + version: 3.0.0 + resolution: "chalk@npm:3.0.0" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: 8e3ddf3981c4da405ddbd7d9c8d91944ddf6e33d6837756979f7840a29272a69a5189ecae0ff84006750d6d1e92368d413335eab4db5476db6e6703a1d1e0505 + languageName: node + linkType: hard + "chalk@npm:^1.1.3": version: 1.1.3 resolution: "chalk@npm:1.1.3" @@ -5795,6 +6054,25 @@ __metadata: languageName: node linkType: hard +"chokidar@npm:3.5.1": + version: 3.5.1 + resolution: "chokidar@npm:3.5.1" + dependencies: + anymatch: ~3.1.1 + braces: ~3.0.2 + fsevents: ~2.3.1 + glob-parent: ~5.1.0 + is-binary-path: ~2.1.0 + is-glob: ~4.0.1 + normalize-path: ~3.0.0 + readdirp: ~3.5.0 + dependenciesMeta: + fsevents: + optional: true + checksum: b7774e6e3aeca084d39e8542041555a11452414c744122436101243f89580fad97154ae11525e46bfa816313ae32533e2a88e8587e4d50b14ea716a9e6538978 + languageName: node + linkType: hard + "chokidar@npm:3.5.3, chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.4.0, chokidar@npm:^3.4.3, chokidar@npm:^3.5.2": version: 3.5.3 resolution: "chokidar@npm:3.5.3" @@ -5814,7 +6092,7 @@ __metadata: languageName: node linkType: hard -"chownr@npm:^1.1.4": +"chownr@npm:^1.0.1, chownr@npm:^1.1.4": version: 1.1.4 resolution: "chownr@npm:1.1.4" checksum: 115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d @@ -5842,7 +6120,7 @@ __metadata: languageName: node linkType: hard -"cids@npm:^0.7.1": +"cids@npm:^0.7.1, cids@npm:~0.7.0, cids@npm:~0.7.1": version: 0.7.5 resolution: "cids@npm:0.7.5" dependencies: @@ -5855,6 +6133,19 @@ __metadata: languageName: node linkType: hard +"cids@npm:~0.8.0": + version: 0.8.3 + resolution: "cids@npm:0.8.3" + dependencies: + buffer: ^5.6.0 + class-is: ^1.1.0 + multibase: ^1.0.0 + multicodec: ^1.0.1 + multihashes: ^1.0.1 + checksum: ca4b18e421a6f5e446e63f296ad5c91b55bd4dd4880a78777857b2279460259946691d383928503c4381f0e05f998c7bfab5b6e623acc2d4d237571d99c53d9d + languageName: node + linkType: hard + "cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": version: 1.0.4 resolution: "cipher-base@npm:1.0.4" @@ -5925,7 +6216,14 @@ __metadata: languageName: node linkType: hard -"cli-table3@npm:^0.5.0": +"cli-spinners@npm:^2.2.0": + version: 2.6.1 + resolution: "cli-spinners@npm:2.6.1" + checksum: 423409baaa7a58e5104b46ca1745fbfc5888bbd0b0c5a626e052ae1387060839c8efd512fb127e25769b3dc9562db1dc1b5add6e0b93b7ef64f477feb6416a45 + languageName: node + linkType: hard + +"cli-table3@npm:^0.5.0, cli-table3@npm:~0.5.0": version: 0.5.1 resolution: "cli-table3@npm:0.5.1" dependencies: @@ -6018,6 +6316,13 @@ __metadata: languageName: node linkType: hard +"clone@npm:^1.0.2": + version: 1.0.4 + resolution: "clone@npm:1.0.4" + checksum: d06418b7335897209e77bdd430d04f882189582e67bd1f75a04565f3f07f5b3f119a9d670c943b6697d0afb100f03b866b3b8a1f91d4d02d72c4ecf2bb64b5dd + languageName: node + linkType: hard + "clsx@npm:^1.1.1": version: 1.1.1 resolution: "clsx@npm:1.1.1" @@ -6104,6 +6409,13 @@ __metadata: languageName: node linkType: hard +"colors@npm:1.3.3": + version: 1.3.3 + resolution: "colors@npm:1.3.3" + checksum: c57f0aa2b71a836435fb0cd8ac4b9f4025ff5411cb027ffcbaa2274347fd00ed52b9d66904f46be73086c27ac31bad9500da675250c95182568454b392f87ee5 + languageName: node + linkType: hard + "colors@npm:1.4.0, colors@npm:^1.1.2": version: 1.4.0 resolution: "colors@npm:1.4.0" @@ -6178,7 +6490,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^2.20.0": +"commander@npm:^2.12.2, commander@npm:^2.15.0, commander@npm:^2.20.0": version: 2.20.3 resolution: "commander@npm:2.20.3" checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e @@ -6223,7 +6535,17 @@ __metadata: languageName: node linkType: hard -"concat-stream@npm:^1.5.1, concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2": +"concat-stream@github:hugomrdias/concat-stream#feat/smaller": + version: 2.0.0 + resolution: "concat-stream@https://github.com/hugomrdias/concat-stream.git#commit=057bc7b5d6d8df26c8cf00a3f151b6721a0a8034" + dependencies: + inherits: ^2.0.3 + readable-stream: ^3.0.2 + checksum: 1cef636e7061f310088706b34fe774e3960dff60a5039158b5e5c84795f6dd8a3411659324280405b8c5f1d7e8e3d4f68fa48e55963ed14953a44fef66423329 + languageName: node + linkType: hard + +"concat-stream@npm:^1.5.1, concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2, concat-stream@npm:~1.6.2": version: 1.6.2 resolution: "concat-stream@npm:1.6.2" dependencies: @@ -6553,6 +6875,19 @@ __metadata: languageName: node linkType: hard +"cosmiconfig@npm:6.0.0": + version: 6.0.0 + resolution: "cosmiconfig@npm:6.0.0" + dependencies: + "@types/parse-json": ^4.0.0 + import-fresh: ^3.1.0 + parse-json: ^5.0.0 + path-type: ^4.0.0 + yaml: ^1.7.2 + checksum: 8eed7c854b91643ecb820767d0deb038b50780ecc3d53b0b19e03ed8aabed4ae77271198d1ae3d49c3b110867edf679f5faad924820a8d1774144a87cb6f98fc + languageName: node + linkType: hard + "cosmiconfig@npm:^5.0.7": version: 5.2.1 resolution: "cosmiconfig@npm:5.2.1" @@ -6657,7 +6992,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -6941,7 +7276,16 @@ __metadata: languageName: node linkType: hard -"debug@npm:^3.1.0, debug@npm:^3.2.7": +"debug@npm:4.1.1": + version: 4.1.1 + resolution: "debug@npm:4.1.1" + dependencies: + ms: ^2.1.1 + checksum: 1e681f5cce94ba10f8dde74b20b42e4d8cf0d2a6700f4c165bb3bb6885565ef5ca5885bf07e704974a835f2415ff095a63164f539988a1f07e8a69fe8b1d65ad + languageName: node + linkType: hard + +"debug@npm:^3.1.0, debug@npm:^3.2.6, debug@npm:^3.2.7": version: 3.2.7 resolution: "debug@npm:3.2.7" dependencies: @@ -7034,6 +7378,15 @@ __metadata: languageName: node linkType: hard +"defaults@npm:^1.0.3": + version: 1.0.3 + resolution: "defaults@npm:1.0.3" + dependencies: + clone: ^1.0.2 + checksum: 96e2112da6553d376afd5265ea7cbdb2a3b45535965d71ab8bb1da10c8126d168fdd5268799625324b368356d21ba2a7b3d4ec50961f11a47b7feb9de3d4413e + languageName: node + linkType: hard + "defer-to-connect@npm:^1.0.1": version: 1.1.3 resolution: "defer-to-connect@npm:1.1.3" @@ -7128,6 +7481,13 @@ __metadata: languageName: node linkType: hard +"delimit-stream@npm:0.1.0": + version: 0.1.0 + resolution: "delimit-stream@npm:0.1.0" + checksum: 78e71f488950546f763a3f27bd68ec74de00432a27da55cf6804bee5e614efb2248144ac16b8dc8d757561d91442784328eeb410e63d7438af2407226585b4f7 + languageName: node + linkType: hard + "depcheck@npm:^1.4.2": version: 1.4.3 resolution: "depcheck@npm:1.4.3" @@ -7278,6 +7638,36 @@ __metadata: languageName: node linkType: hard +"docker-compose@npm:0.23.4": + version: 0.23.4 + resolution: "docker-compose@npm:0.23.4" + checksum: bf5c316dde407ba0e4cbfe7d54ac973a731048347c14b8aae0aad94d5ee60be7cc5a905fac8fa1734cdcad93c5218efcbdbfdd1d03bcbf89aa5ed8b24beec98b + languageName: node + linkType: hard + +"docker-modem@npm:^1.0.8": + version: 1.0.9 + resolution: "docker-modem@npm:1.0.9" + dependencies: + JSONStream: 1.3.2 + debug: ^3.2.6 + readable-stream: ~1.0.26-4 + split-ca: ^1.0.0 + checksum: b34829f5abecf28332f1870c88bdf795750520264e9fdc8e9041058f18b1846543061ee32fb21ff14e9da6b5498af6b2cb4d96422d8c2dc02d9f622b01f34fe6 + languageName: node + linkType: hard + +"dockerode@npm:2.5.8": + version: 2.5.8 + resolution: "dockerode@npm:2.5.8" + dependencies: + concat-stream: ~1.6.2 + docker-modem: ^1.0.8 + tar-fs: ~1.16.3 + checksum: 01381da98f98a3236b735fb2bb2a66f521da39200a2a11b83777cee3b104b32966ba7dfeb93f3fa8ab85b5e639265842d66f576e7db9562b1049564c2af6ec84 + languageName: node + linkType: hard + "doctrine@npm:^2.1.0": version: 2.1.0 resolution: "doctrine@npm:2.1.0" @@ -7443,6 +7833,13 @@ __metadata: languageName: node linkType: hard +"ejs@npm:^2.6.1": + version: 2.7.4 + resolution: "ejs@npm:2.7.4" + checksum: a1d2bfc7d1f0b39e99ae19b20c9469a25aeddba1ffc225db098110b18d566f73772fcdcc740b108cfda7452276f67d7b64eb359f90285414c942f4ae70713371 + languageName: node + linkType: hard + "electron-to-chromium@npm:^1.3.47, electron-to-chromium@npm:^1.4.84": version: 1.4.86 resolution: "electron-to-chromium@npm:1.4.86" @@ -7541,7 +7938,7 @@ __metadata: languageName: node linkType: hard -"end-of-stream@npm:^1.1.0": +"end-of-stream@npm:^1.0.0, end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1": version: 1.4.4 resolution: "end-of-stream@npm:1.4.4" dependencies: @@ -7560,6 +7957,15 @@ __metadata: languageName: node linkType: hard +"enquirer@npm:2.3.4": + version: 2.3.4 + resolution: "enquirer@npm:2.3.4" + dependencies: + ansi-colors: ^3.2.1 + checksum: e1dc49cfd9ca0c5d952dd5729e3129d5170016a89e490fbd3fee92aeaf7511b4f01be5cef1053faecbb5874f58a63acac1c494050e63c7020e509ddc6590d310 + languageName: node + linkType: hard + "enquirer@npm:^2.3.0, enquirer@npm:^2.3.5, enquirer@npm:^2.3.6": version: 2.3.6 resolution: "enquirer@npm:2.3.6" @@ -7590,7 +7996,14 @@ __metadata: languageName: node linkType: hard -"err-code@npm:^2.0.2": +"err-code@npm:^1.1.2": + version: 1.1.2 + resolution: "err-code@npm:1.1.2" + checksum: a1c6a194d21084241c09e0ea78db4c503030042098048903f2d940ef48c1484bbf97e99d32d6b35e5f8871dd6b292fabf904f115914f5792a591157ac6584e31 + languageName: node + linkType: hard + +"err-code@npm:^2.0.0, err-code@npm:^2.0.2": version: 2.0.3 resolution: "err-code@npm:2.0.3" checksum: 8b7b1be20d2de12d2255c0bc2ca638b7af5171142693299416e6a9339bd7d88fc8d7707d913d78e0993176005405a236b066b45666b27b797252c771156ace54 @@ -7685,6 +8098,22 @@ __metadata: languageName: node linkType: hard +"es6-promise@npm:^4.0.3": + version: 4.2.8 + resolution: "es6-promise@npm:4.2.8" + checksum: 95614a88873611cb9165a85d36afa7268af5c03a378b35ca7bda9508e1d4f1f6f19a788d4bc755b3fd37c8ebba40782018e02034564ff24c9d6fa37e959ad57d + languageName: node + linkType: hard + +"es6-promisify@npm:^5.0.0": + version: 5.0.0 + resolution: "es6-promisify@npm:5.0.0" + dependencies: + es6-promise: ^4.0.3 + checksum: fbed9d791598831413be84a5374eca8c24800ec71a16c1c528c43a98e2dadfb99331483d83ae6094ddb9b87e6f799a15d1553cebf756047e0865c753bc346b92 + languageName: node + linkType: hard + "es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": version: 3.1.3 resolution: "es6-symbol@npm:3.1.3" @@ -8901,6 +9330,24 @@ __metadata: languageName: node linkType: hard +"execa@npm:^3.0.0": + version: 3.4.0 + resolution: "execa@npm:3.4.0" + dependencies: + cross-spawn: ^7.0.0 + get-stream: ^5.0.0 + human-signals: ^1.1.1 + is-stream: ^2.0.0 + merge-stream: ^2.0.0 + npm-run-path: ^4.0.0 + onetime: ^5.1.0 + p-finally: ^2.0.0 + signal-exit: ^3.0.2 + strip-final-newline: ^2.0.0 + checksum: 72832ff72f79f9082dc3567775cbb52f4682452f7d8015714d924e476a37c36a98183fd669317327ed2e7800ffe7ec2a7be4bfe704a2173ef22ae00109fe9123 + languageName: node + linkType: hard + "execa@npm:^5.0.0, execa@npm:^5.1.1": version: 5.1.1 resolution: "execa@npm:5.1.1" @@ -8940,6 +9387,13 @@ __metadata: languageName: node linkType: hard +"explain-error@npm:^1.0.4": + version: 1.0.4 + resolution: "explain-error@npm:1.0.4" + checksum: 38afbe93c00aa313cd20d41d1103368090313765c86e2b2baf77f11979016fe862de1d05673aaf8297c5b1e67f0a68e95e5aee6df6a1e913766f506c00563c84 + languageName: node + linkType: hard + "express@npm:^4.14.0": version: 4.17.3 resolution: "express@npm:4.17.3" @@ -9054,6 +9508,13 @@ __metadata: languageName: node linkType: hard +"eyes@npm:^0.1.8": + version: 0.1.8 + resolution: "eyes@npm:0.1.8" + checksum: c31703a92bf36ba75ee8d379ee7985c24ee6149f3a6175f44cec7a05b178c38bce9836d3ca48c9acb0329a960ac2c4b2ead4e60cdd4fe6e8c92cad7cd6913687 + languageName: node + linkType: hard + "fake-merkle-patricia-tree@npm:^1.0.1": version: 1.0.1 resolution: "fake-merkle-patricia-tree@npm:1.0.1" @@ -9319,6 +9780,13 @@ __metadata: languageName: node linkType: hard +"flatmap@npm:0.0.3": + version: 0.0.3 + resolution: "flatmap@npm:0.0.3" + checksum: c527c7d299c000e6a21d5342986915479d23b15530b1582a25ab993f55dfd7ace310df58eb6eb719aa53e1d6e2c9df54fca0dcde4e4c8f1e77e9bfae6d978131 + languageName: node + linkType: hard + "flatted@npm:^2.0.0": version: 2.0.2 resolution: "flatted@npm:2.0.2" @@ -9470,11 +9938,30 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^0.30.0": - version: 0.30.0 - resolution: "fs-extra@npm:0.30.0" +"fs-constants@npm:^1.0.0": + version: 1.0.0 + resolution: "fs-constants@npm:1.0.0" + checksum: 18f5b718371816155849475ac36c7d0b24d39a11d91348cfcb308b4494824413e03572c403c86d3a260e049465518c4f0d5bd00f0371cdfcad6d4f30a85b350d + languageName: node + linkType: hard + +"fs-extra@npm:9.0.0": + version: 9.0.0 + resolution: "fs-extra@npm:9.0.0" dependencies: - graceful-fs: ^4.1.2 + at-least-node: ^1.0.0 + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^1.0.0 + checksum: c4269fbfd8d8d2a1edca4257fa28545caf7e5ad218d264f723c338a154d3624d2ef098c19915b9436d3186b7ac45d5b032371a2004008ec0cd4072512e853aa8 + languageName: node + linkType: hard + +"fs-extra@npm:^0.30.0": + version: 0.30.0 + resolution: "fs-extra@npm:0.30.0" + dependencies: + graceful-fs: ^4.1.2 jsonfile: ^2.1.0 klaw: ^1.0.0 path-is-absolute: ^1.0.0 @@ -9539,6 +10026,16 @@ __metadata: languageName: node linkType: hard +"fs-jetpack@npm:^2.2.2": + version: 2.4.0 + resolution: "fs-jetpack@npm:2.4.0" + dependencies: + minimatch: ^3.0.2 + rimraf: ^2.6.3 + checksum: 486a2974f5bbd3181b787416ff9c5fe128e2fa4a902e7314c659f0e141431ff075da1c674b98ba96e4f5b667a5f492231c51703ac3f073920f6388221394e92b + languageName: node + linkType: hard + "fs-minipass@npm:^1.2.7": version: 1.2.7 resolution: "fs-minipass@npm:1.2.7" @@ -9581,7 +10078,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.3.2": +"fsevents@npm:~2.3.1, fsevents@npm:~2.3.2": version: 2.3.2 resolution: "fsevents@npm:2.3.2" dependencies: @@ -9600,7 +10097,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@~2.3.2#~builtin": +"fsevents@patch:fsevents@~2.3.1#~builtin, fsevents@patch:fsevents@~2.3.2#~builtin": version: 2.3.2 resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7" dependencies: @@ -9772,7 +10269,7 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^5.1.0": +"get-stream@npm:^5.0.0, get-stream@npm:^5.1.0": version: 5.2.0 resolution: "get-stream@npm:5.2.0" dependencies: @@ -9911,6 +10408,20 @@ __metadata: languageName: node linkType: hard +"glob@npm:7.1.6": + version: 7.1.6 + resolution: "glob@npm:7.1.6" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.0.4 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 351d549dd90553b87c2d3f90ce11aed9e1093c74130440e7ae0592e11bbcd2ce7f0ebb8ba6bfe63aaf9b62166a7f4c80cb84490ae5d78408bb2572bf7d4ee0a6 + languageName: node + linkType: hard + "glob@npm:7.2.0, glob@npm:^7.0.0, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0, glob@npm:~7.2.0": version: 7.2.0 resolution: "glob@npm:7.2.0" @@ -10030,6 +10541,47 @@ __metadata: languageName: node linkType: hard +"gluegun@git+https://github.com/edgeandnode/gluegun.git#v4.3.1-pin-colors-dep": + version: 4.3.1 + resolution: "gluegun@https://github.com/edgeandnode/gluegun.git#commit=b34b9003d7bf556836da41b57ef36eb21570620a" + dependencies: + apisauce: ^1.0.1 + app-module-path: ^2.2.0 + cli-table3: ~0.5.0 + colors: 1.3.3 + cosmiconfig: 6.0.0 + cross-spawn: ^7.0.0 + ejs: ^2.6.1 + enquirer: 2.3.4 + execa: ^3.0.0 + fs-jetpack: ^2.2.2 + lodash.camelcase: ^4.3.0 + lodash.kebabcase: ^4.1.1 + lodash.lowercase: ^4.3.0 + lodash.lowerfirst: ^4.3.1 + lodash.pad: ^4.5.1 + lodash.padend: ^4.6.1 + lodash.padstart: ^4.6.1 + lodash.repeat: ^4.1.0 + lodash.snakecase: ^4.1.1 + lodash.startcase: ^4.4.0 + lodash.trim: ^4.5.1 + lodash.trimend: ^4.5.1 + lodash.trimstart: ^4.5.1 + lodash.uppercase: ^4.3.0 + lodash.upperfirst: ^4.3.1 + ora: ^4.0.0 + pluralize: ^8.0.0 + ramdasauce: ^2.1.0 + semver: ^7.0.0 + which: ^2.0.0 + yargs-parser: ^16.1.0 + bin: + gluegun: bin/gluegun + checksum: 872685026db07ad1687056a78388f17c6a9bcd22bbf9d99d1e2b21e2d196c6e99a128bcff48063b3f0cf692a4365142fae9dd06cf8c532bc557a45f8ac853308 + languageName: node + linkType: hard + "got@npm:9.6.0": version: 9.6.0 resolution: "got@npm:9.6.0" @@ -10078,6 +10630,13 @@ __metadata: languageName: node linkType: hard +"graphql@npm:15.5.0": + version: 15.5.0 + resolution: "graphql@npm:15.5.0" + checksum: 58a69f7274ae94c690bfa2517f96bbaf1327e1ca1fc46606e772ba2f7ca517adeb375346301373351e693022f448b7866163034209623d7c5315819ef8c5e7c0 + languageName: node + linkType: hard + "growl@npm:1.10.5": version: 1.10.5 resolution: "growl@npm:1.10.5" @@ -10449,6 +11008,13 @@ __metadata: languageName: node linkType: hard +"hi-base32@npm:~0.5.0": + version: 0.5.1 + resolution: "hi-base32@npm:0.5.1" + checksum: 6655682b5796d75ed3068071e61d05a490e2086c4908af3b94a730059147b8a4a5e8870e656b828d0550dcc9988d8748bda54a53e428cbce28e0d7a785b2ffde + languageName: node + linkType: hard + "hmac-drbg@npm:^1.0.1": version: 1.0.1 resolution: "hmac-drbg@npm:1.0.1" @@ -10681,6 +11247,13 @@ __metadata: languageName: node linkType: hard +"human-signals@npm:^1.1.1": + version: 1.1.1 + resolution: "human-signals@npm:1.1.1" + checksum: d587647c9e8ec24e02821b6be7de5a0fc37f591f6c4e319b3054b43fd4c35a70a94c46fc74d8c1a43c47fde157d23acd7421f375e1c1365b09a16835b8300205 + languageName: node + linkType: hard + "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" @@ -10742,7 +11315,7 @@ __metadata: languageName: node linkType: hard -"ieee754@npm:^1.1.13": +"ieee754@npm:^1.1.13, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e @@ -10777,6 +11350,13 @@ __metadata: languageName: node linkType: hard +"immutable@npm:3.8.2": + version: 3.8.2 + resolution: "immutable@npm:3.8.2" + checksum: 41909b386950ff84ca3cfca77c74cfc87d225a914e98e6c57996fa81a328da61a7c32216d6d5abad40f54747ffdc5c4b02b102e6ad1a504c1752efde8041f964 + languageName: node + linkType: hard + "immutable@npm:^4.0.0, immutable@npm:^4.0.0-rc.12": version: 4.0.0 resolution: "immutable@npm:4.0.0" @@ -10794,7 +11374,7 @@ __metadata: languageName: node linkType: hard -"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1": +"import-fresh@npm:^3.0.0, import-fresh@npm:^3.1.0, import-fresh@npm:^3.2.1": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" dependencies: @@ -10920,6 +11500,20 @@ __metadata: languageName: node linkType: hard +"ip-regex@npm:^2.0.0": + version: 2.1.0 + resolution: "ip-regex@npm:2.1.0" + checksum: 331d95052aa53ce245745ea0fc3a6a1e2e3c8d6da65fa8ea52bf73768c1b22a9ac50629d1d2b08c04e7b3ac4c21b536693c149ce2c2615ee4796030e5b3e3cba + languageName: node + linkType: hard + +"ip-regex@npm:^4.0.0": + version: 4.3.0 + resolution: "ip-regex@npm:4.3.0" + checksum: 7ff904b891221b1847f3fdf3dbb3e6a8660dc39bc283f79eb7ed88f5338e1a3d1104b779bc83759159be266249c59c2160e779ee39446d79d4ed0890dfd06f08 + languageName: node + linkType: hard + "ip@npm:^1.1.5": version: 1.1.5 resolution: "ip@npm:1.1.5" @@ -10934,6 +11528,129 @@ __metadata: languageName: node linkType: hard +"ipfs-block@npm:~0.8.1": + version: 0.8.1 + resolution: "ipfs-block@npm:0.8.1" + dependencies: + cids: ~0.7.0 + class-is: ^1.1.0 + checksum: 4f20fc89ce452b8567a8706f3cf781c237dc3710d756ade88df05dd9ad65a59016497aadef9f6c821e7b63127d778b3571a8ea7f80bd3f00314a5ddd95c6e027 + languageName: node + linkType: hard + +"ipfs-http-client@npm:34.0.0": + version: 34.0.0 + resolution: "ipfs-http-client@npm:34.0.0" + dependencies: + abort-controller: ^3.0.0 + async: ^2.6.1 + bignumber.js: ^9.0.0 + bl: ^3.0.0 + bs58: ^4.0.1 + buffer: ^5.4.2 + cids: ~0.7.1 + concat-stream: "github:hugomrdias/concat-stream#feat/smaller" + debug: ^4.1.0 + detect-node: ^2.0.4 + end-of-stream: ^1.4.1 + err-code: ^2.0.0 + explain-error: ^1.0.4 + flatmap: 0.0.3 + glob: ^7.1.3 + ipfs-block: ~0.8.1 + ipfs-utils: ~0.0.3 + ipld-dag-cbor: ~0.15.0 + ipld-dag-pb: ~0.17.3 + ipld-raw: ^4.0.0 + is-ipfs: ~0.6.1 + is-pull-stream: 0.0.0 + is-stream: ^2.0.0 + iso-stream-http: ~0.1.2 + iso-url: ~0.4.6 + iterable-ndjson: ^1.1.0 + just-kebab-case: ^1.1.0 + just-map-keys: ^1.1.0 + kind-of: ^6.0.2 + ky: ^0.11.2 + ky-universal: ^0.2.2 + lru-cache: ^5.1.1 + multiaddr: ^6.0.6 + multibase: ~0.6.0 + multicodec: ~0.5.1 + multihashes: ~0.4.14 + ndjson: "github:hugomrdias/ndjson#feat/readable-stream3" + once: ^1.4.0 + peer-id: ~0.12.3 + peer-info: ~0.15.1 + promise-nodeify: ^3.0.1 + promisify-es6: ^1.0.3 + pull-defer: ~0.2.3 + pull-stream: ^3.6.9 + pull-to-stream: ~0.1.1 + pump: ^3.0.0 + qs: ^6.5.2 + readable-stream: ^3.1.1 + stream-to-pull-stream: ^1.7.2 + tar-stream: ^2.0.1 + through2: ^3.0.1 + checksum: f9548807a2ee7ee3c7c7082e5bf9c339834735082563d1e69c03b9634ab23cbd939c784efd7d392d05779c34e8d6ece4388651178981930f7338c36aaaea10c7 + languageName: node + linkType: hard + +"ipfs-utils@npm:~0.0.3": + version: 0.0.4 + resolution: "ipfs-utils@npm:0.0.4" + dependencies: + buffer: ^5.2.1 + is-buffer: ^2.0.3 + is-electron: ^2.2.0 + is-pull-stream: 0.0.0 + is-stream: ^2.0.0 + kind-of: ^6.0.2 + readable-stream: ^3.4.0 + checksum: bbb05fae59d09dad7f7612063c8f0a1ea87939dc3e878e80ce102499cd66cc0c2fc0cfac70e4db0e1921e8ca54e88d36450e4e1aba58ee650ee74821c8d032f8 + languageName: node + linkType: hard + +"ipld-dag-cbor@npm:~0.15.0": + version: 0.15.3 + resolution: "ipld-dag-cbor@npm:0.15.3" + dependencies: + borc: ^2.1.2 + buffer: ^5.5.0 + cids: ~0.8.0 + is-circular: ^1.0.2 + multicodec: ^1.0.0 + multihashing-async: ~0.8.0 + checksum: f31992a0adbf9cdf81ea5b052f350d6d9447f850254c5e3505785dcb18d9aae9525155514b00c40b387a7c4b1dbed71574f04dfda89868fffb6a0a126609a63f + languageName: node + linkType: hard + +"ipld-dag-pb@npm:~0.17.3": + version: 0.17.4 + resolution: "ipld-dag-pb@npm:0.17.4" + dependencies: + cids: ~0.7.0 + class-is: ^1.1.0 + multicodec: ~0.5.1 + multihashing-async: ~0.7.0 + protons: ^1.0.1 + stable: ~0.1.8 + checksum: 92febba3e767b69a0e261a13c3200cef491c230332854711a5e3bfd7dacfb7e0d665f379634bc030603bae22c8b40e0c2ac04f2a9eed6646853e8ce56286e08d + languageName: node + linkType: hard + +"ipld-raw@npm:^4.0.0": + version: 4.0.1 + resolution: "ipld-raw@npm:4.0.1" + dependencies: + cids: ~0.7.0 + multicodec: ^1.0.0 + multihashing-async: ~0.8.0 + checksum: 3414d9b7d67959b85cb057de2a1e206cb25e9329fd4e3e180b839e65dc0a5907c4590b607f83c6260c3d6a5f4abc22208b35175d7c872edb57ceae1fbb458a22 + languageName: node + linkType: hard + "is-accessor-descriptor@npm:^0.1.6": version: 0.1.6 resolution: "is-accessor-descriptor@npm:0.1.6" @@ -11004,7 +11721,7 @@ __metadata: languageName: node linkType: hard -"is-buffer@npm:~2.0.3": +"is-buffer@npm:^2.0.3, is-buffer@npm:~2.0.3": version: 2.0.5 resolution: "is-buffer@npm:2.0.5" checksum: 764c9ad8b523a9f5a32af29bdf772b08eb48c04d2ad0a7240916ac2688c983bf5f8504bf25b35e66240edeb9d9085461f9b5dae1f3d2861c6b06a65fe983de42 @@ -11029,6 +11746,13 @@ __metadata: languageName: node linkType: hard +"is-circular@npm:^1.0.2": + version: 1.0.2 + resolution: "is-circular@npm:1.0.2" + checksum: ce57fe91aa568852006e2afe869db18bd062b5f9f4b8ac7e138e14ce412e26fe97ea39ab6e4889792ef58daafd594a84e8383ef8e667345a3081c1a79d536094 + languageName: node + linkType: hard + "is-core-module@npm:^2.2.0, is-core-module@npm:^2.4.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.0, is-core-module@npm:^2.8.1": version: 2.8.1 resolution: "is-core-module@npm:2.8.1" @@ -11103,6 +11827,13 @@ __metadata: languageName: node linkType: hard +"is-electron@npm:^2.2.0": + version: 2.2.1 + resolution: "is-electron@npm:2.2.1" + checksum: 06e569aa933a737d418489bb9ca081af62eceb714d4c3d553ad2497610e35494be6dddd010c4e29890c7dd9d0481c2e3e1e9097af9d19df1c52dd5be747d80a0 + languageName: node + linkType: hard + "is-extendable@npm:^0.1.0, is-extendable@npm:^0.1.1": version: 0.1.1 resolution: "is-extendable@npm:0.1.1" @@ -11195,6 +11926,45 @@ __metadata: languageName: node linkType: hard +"is-interactive@npm:^1.0.0": + version: 1.0.0 + resolution: "is-interactive@npm:1.0.0" + checksum: 824808776e2d468b2916cdd6c16acacebce060d844c35ca6d82267da692e92c3a16fdba624c50b54a63f38bdc4016055b6f443ce57d7147240de4f8cdabaf6f9 + languageName: node + linkType: hard + +"is-ip@npm:^2.0.0": + version: 2.0.0 + resolution: "is-ip@npm:2.0.0" + dependencies: + ip-regex: ^2.0.0 + checksum: ad85d3a0bccca2c0096f5067b8f5fd0a0f9a26e5ed0990bb88eca004853422fbec4a26ec7a70342888f866074a9720b2cc11428e26c5950d6822a1dbefb80307 + languageName: node + linkType: hard + +"is-ip@npm:^3.1.0": + version: 3.1.0 + resolution: "is-ip@npm:3.1.0" + dependencies: + ip-regex: ^4.0.0 + checksum: da2c2b282407194adf2320bade0bad94be9c9d0bdab85ff45b1b62d8185f31c65dff3884519d57bf270277e5ea2046c7916a6e5a6db22fe4b7ddcdd3760f23eb + languageName: node + linkType: hard + +"is-ipfs@npm:~0.6.1": + version: 0.6.3 + resolution: "is-ipfs@npm:0.6.3" + dependencies: + bs58: ^4.0.1 + cids: ~0.7.0 + mafmt: ^7.0.0 + multiaddr: ^7.2.1 + multibase: ~0.6.0 + multihashes: ~0.4.13 + checksum: 10670511dc954e56512449e38faae43b6b36f29dd0132911d951db6e988d6af9daa1f8fb54f16867a17540f0338050addb2a0c1ceba6482a059913031e441ee4 + languageName: node + linkType: hard + "is-json@npm:^2.0.1": version: 2.0.1 resolution: "is-json@npm:2.0.1" @@ -11285,6 +12055,20 @@ __metadata: languageName: node linkType: hard +"is-promise@npm:~1, is-promise@npm:~1.0.0": + version: 1.0.1 + resolution: "is-promise@npm:1.0.1" + checksum: 75e6fac7e60e7fa979bf7a53cb7d42f3fd0991795cad6e195196fded7acbc7609e22230435a435b0924037030bdc32b0bc97f593ff2a362a69ddde1bc1fb08ef + languageName: node + linkType: hard + +"is-pull-stream@npm:0.0.0": + version: 0.0.0 + resolution: "is-pull-stream@npm:0.0.0" + checksum: e1022ed7645df500e4a78d96a1ce16c954ca70c0277f94f308a01b6ce0d9d9d00180caf07de83367d66e136512093ecb1dea0def123dca86c5f1599e7757902f + languageName: node + linkType: hard + "is-regex@npm:^1.0.4, is-regex@npm:^1.1.4, is-regex@npm:~1.1.4": version: 1.1.4 resolution: "is-regex@npm:1.1.4" @@ -11444,6 +12228,34 @@ __metadata: languageName: node linkType: hard +"iso-random-stream@npm:^1.1.0": + version: 1.1.2 + resolution: "iso-random-stream@npm:1.1.2" + dependencies: + buffer: ^6.0.3 + readable-stream: ^3.4.0 + checksum: 7836021ecfc4d9dda1198dc6eef169c5c02a1781e4d015fc79b1e17f67095e066d8d9ef1091c8feb29f8b07e8d4d6f28281bebf7f8755e1c7647e94b2ee3b021 + languageName: node + linkType: hard + +"iso-stream-http@npm:~0.1.2": + version: 0.1.2 + resolution: "iso-stream-http@npm:0.1.2" + dependencies: + builtin-status-codes: ^3.0.0 + inherits: ^2.0.1 + readable-stream: ^3.1.1 + checksum: 978c8d6d1ed27047bfc60ec434ef14bfc232793c44aaaf4dda651dd6706e08e8ec0a4fe459acc0138a187d17de798c42c385301a75dc733fa1fa9a20d7ac0270 + languageName: node + linkType: hard + +"iso-url@npm:~0.4.6, iso-url@npm:~0.4.7": + version: 0.4.7 + resolution: "iso-url@npm:0.4.7" + checksum: c42ae615b462fec55ea7b480548fc76ef69af26103fcbb12a305dd929a4c18c6b22e29c666b0601280e552f56b0f144eab0b28b9a6fbb12ec58dc7c8ae053124 + languageName: node + linkType: hard + "isobject@npm:^2.0.0": version: 2.1.0 resolution: "isobject@npm:2.1.0" @@ -11477,6 +12289,36 @@ __metadata: languageName: node linkType: hard +"iterable-ndjson@npm:^1.1.0": + version: 1.1.0 + resolution: "iterable-ndjson@npm:1.1.0" + dependencies: + string_decoder: ^1.2.0 + checksum: 15a64fdd33b92e0e1df49df50a2f838e0fdb3f7801ac04ae3c4931ac874e8105cf915c7cd4fb207bccac2435940e9b90b1564e29aa1ed31105d1dea529ab611b + languageName: node + linkType: hard + +"jayson@npm:3.2.0": + version: 3.2.0 + resolution: "jayson@npm:3.2.0" + dependencies: + "@types/connect": ^3.4.32 + "@types/express-serve-static-core": ^4.16.9 + "@types/lodash": ^4.14.139 + "@types/node": ^12.7.7 + JSONStream: ^1.3.1 + commander: ^2.12.2 + es6-promisify: ^5.0.0 + eyes: ^0.1.8 + json-stringify-safe: ^5.0.1 + lodash: ^4.17.15 + uuid: ^3.2.1 + bin: + jayson: ./bin/jayson.js + checksum: 0da8126eaa98f15494700d183a8f74c16294f4073ad99b9b2744d4daa321d8f14fe5db3972eda6872c6ba9c5b80ca490f3216b24443bb2eda0b1904e9a010f32 + languageName: node + linkType: hard + "jest-worker@npm:^27.4.5": version: 27.5.1 resolution: "jest-worker@npm:27.5.1" @@ -11495,7 +12337,7 @@ __metadata: languageName: node linkType: hard -"js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": +"js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0, js-sha3@npm:~0.8.0": version: 0.8.0 resolution: "js-sha3@npm:0.8.0" checksum: 75df77c1fc266973f06cce8309ce010e9e9f07ec35ab12022ed29b7f0d9c8757f5a73e1b35aa24840dced0dea7059085aa143d817aea9e188e2a80d569d9adce @@ -11687,6 +12529,15 @@ __metadata: languageName: node linkType: hard +"json-text-sequence@npm:~0.1.0": + version: 0.1.1 + resolution: "json-text-sequence@npm:0.1.1" + dependencies: + delimit-stream: 0.1.0 + checksum: 3d413b3d2b1b9a48b12221cae86f4f247ef400ab98fa65981a5e9c0d62a289d318aeeb0b7657b3d5df5a146d7533601f5d75297b0319175797e023088fd1c8e4 + languageName: node + linkType: hard + "json5@npm:^0.5.1": version: 0.5.1 resolution: "json5@npm:0.5.1" @@ -11798,6 +12649,20 @@ __metadata: languageName: node linkType: hard +"just-kebab-case@npm:^1.1.0": + version: 1.1.0 + resolution: "just-kebab-case@npm:1.1.0" + checksum: f3d8ce1d341a8aac56e956c5df153461f069bdd4a06ac4e477b647c9712051b9e9341d0a7b51ff364c78b58db0fd785dfc01e95e3f553c057571cbd917f40f9b + languageName: node + linkType: hard + +"just-map-keys@npm:^1.1.0": + version: 1.2.1 + resolution: "just-map-keys@npm:1.2.1" + checksum: 1b1954e18fb30321d54d0ffe29ce68092777f8b57d8601c704d8c1f71f960a88bc707a73fbf6107e14d311c736de51525a064a3aaf10fb85a267836583f2ebd7 + languageName: node + linkType: hard + "keccak@npm:3.0.1": version: 3.0.1 resolution: "keccak@npm:3.0.1" @@ -11834,6 +12699,13 @@ __metadata: languageName: node linkType: hard +"keypair@npm:^1.0.1": + version: 1.0.4 + resolution: "keypair@npm:1.0.4" + checksum: 7c91627416ac43ce81013310cdf8a8f92b17a22b64066b21db96446da62414563783ebbfa822ead74de380ee9e7885d267f5f8c31528127ca8437ef690a5cdba + languageName: node + linkType: hard + "keyv@npm:^3.0.0": version: 3.1.0 resolution: "keyv@npm:3.1.0" @@ -11922,6 +12794,25 @@ __metadata: languageName: unknown linkType: soft +"ky-universal@npm:^0.2.2": + version: 0.2.2 + resolution: "ky-universal@npm:0.2.2" + dependencies: + abort-controller: ^3.0.0 + node-fetch: ^2.3.0 + peerDependencies: + ky: ">=0.10.0" + checksum: e9deafb439825f053df798db7fc5ddc2270140126eeed463a8422867de44c939eff3432365f7b9f33fdc37411b9078255ffcb95baeb589bcd0a94f5ee71a5836 + languageName: node + linkType: hard + +"ky@npm:^0.11.2": + version: 0.11.2 + resolution: "ky@npm:0.11.2" + checksum: 01d209c06bd615ca0c4b71bf3bfead358c779e1020fe13c94374046c439535375ff3ad495f947d82b5aaac39dd88a0411fc49f3389f7248439c32ca6544b0b54 + languageName: node + linkType: hard + "lcid@npm:^1.0.0": version: 1.0.0 resolution: "lcid@npm:1.0.0" @@ -12194,6 +13085,44 @@ __metadata: languageName: node linkType: hard +"libp2p-crypto-secp256k1@npm:~0.3.0": + version: 0.3.1 + resolution: "libp2p-crypto-secp256k1@npm:0.3.1" + dependencies: + async: ^2.6.2 + bs58: ^4.0.1 + multihashing-async: ~0.6.0 + nodeify: ^1.0.1 + safe-buffer: ^5.1.2 + secp256k1: ^3.6.2 + checksum: 3972012481bce28d9a171af7ca1ae3d0f9e44bc49fdb406c57c1cbfed297f4bc516748d23efd100ab0e3c9505caf11eb91ea567d53d413d739b262e9b8c71788 + languageName: node + linkType: hard + +"libp2p-crypto@npm:~0.16.1": + version: 0.16.4 + resolution: "libp2p-crypto@npm:0.16.4" + dependencies: + asmcrypto.js: ^2.3.2 + asn1.js: ^5.0.1 + async: ^2.6.1 + bn.js: ^4.11.8 + browserify-aes: ^1.2.0 + bs58: ^4.0.1 + iso-random-stream: ^1.1.0 + keypair: ^1.0.1 + libp2p-crypto-secp256k1: ~0.3.0 + multihashing-async: ~0.5.1 + node-forge: ^0.10.0 + pem-jwk: ^2.0.0 + protons: ^1.0.1 + rsa-pem-to-jwk: ^1.1.3 + tweetnacl: ^1.0.0 + ursa-optional: ~0.10.0 + checksum: 8623cc90e59605c12c3a6b93ca83afc2940dd7b8195552ba9b75504ad858e32d5d77de7f5a9805c6302f09d174b63e681d89e333d2f18a1689c167f54e83d61f + languageName: node + linkType: hard + "lilconfig@npm:^2.0.3": version: 2.0.4 resolution: "lilconfig@npm:2.0.4" @@ -12383,6 +13312,27 @@ __metadata: languageName: node linkType: hard +"lodash.kebabcase@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.kebabcase@npm:4.1.1" + checksum: 5a6c59161914e1bae23438a298c7433e83d935e0f59853fa862e691164696bc07f6dfa4c313d499fbf41ba8d53314e9850416502376705a357d24ee6ca33af78 + languageName: node + linkType: hard + +"lodash.lowercase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.lowercase@npm:4.3.0" + checksum: 463d7e50db29aea736563352f05adcff1f7c60574fe201f47ad98d2834f3dc64bee84a31702e1661d0f94913e89a46ded04befd425bbd3b95d23697689118f98 + languageName: node + linkType: hard + +"lodash.lowerfirst@npm:^4.3.1": + version: 4.3.1 + resolution: "lodash.lowerfirst@npm:4.3.1" + checksum: e1688e18873777d394db4994d150dfc14cf01bf450169cf8296af4d84ecd7c3c4ae4dab3746f77f8719a093e4fff58bee3ae73ae7e23ef508b7d970b189d9952 + languageName: node + linkType: hard + "lodash.memoize@npm:^4.1.2": version: 4.1.2 resolution: "lodash.memoize@npm:4.1.2" @@ -12397,6 +13347,48 @@ __metadata: languageName: node linkType: hard +"lodash.pad@npm:^4.5.1": + version: 4.5.1 + resolution: "lodash.pad@npm:4.5.1" + checksum: 325805c929dad67d61470348046bc92bdad017a9edbda11322cc8945da92a10f943f935d24c340aa6d47cd9a3ff8f5ed6f4a77283266a54e32afae09be0c41ff + languageName: node + linkType: hard + +"lodash.padend@npm:^4.6.1": + version: 4.6.1 + resolution: "lodash.padend@npm:4.6.1" + checksum: c2e6e789debf83b98f5c085305cdcfff1067e7a31bda2a110fd765d3c11a99edfbeef570d9ef737ab3212006bdb8114e77622e518c18c1fce52b8fdfd9dab685 + languageName: node + linkType: hard + +"lodash.padstart@npm:^4.6.1": + version: 4.6.1 + resolution: "lodash.padstart@npm:4.6.1" + checksum: 0d6ad92c626d351db85de539e41df3238d7d36c5fbfc5f57c4f060c90c73ad9f1db566463487795fdf0bf290a8f133189a0bd91d051032f6eb2d15b7e1863b5e + languageName: node + linkType: hard + +"lodash.repeat@npm:^4.1.0": + version: 4.1.0 + resolution: "lodash.repeat@npm:4.1.0" + checksum: dac15fc59ed783678e1a9f986fefa180bfdbf95280852165965ecc8e15b871c6f0eaf7b325768a176014594d5186f1d6558fb72a18527bddd82539fb3ef8a4d3 + languageName: node + linkType: hard + +"lodash.snakecase@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.snakecase@npm:4.1.1" + checksum: 1685ed3e83dda6eae5a4dcaee161a51cd210aabb3e1c09c57150e7dd8feda19e4ca0d27d0631eabe8d0f4eaa51e376da64e8c018ae5415417c5890d42feb72a8 + languageName: node + linkType: hard + +"lodash.startcase@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.startcase@npm:4.4.0" + checksum: c03a4a784aca653845fe09d0ef67c902b6e49288dc45f542a4ab345a9c406a6dc194c774423fa313ee7b06283950301c1221dd2a1d8ecb2dac8dfbb9ed5606b5 + languageName: node + linkType: hard + "lodash.throttle@npm:^4.1.1": version: 4.1.1 resolution: "lodash.throttle@npm:4.1.1" @@ -12404,6 +13396,27 @@ __metadata: languageName: node linkType: hard +"lodash.trim@npm:^4.5.1": + version: 4.5.1 + resolution: "lodash.trim@npm:4.5.1" + checksum: 64b08e97d94d4c7620159371e6fe6cbb706514a41d737db2f189d9ec738305eb08cb772a9bbd2459e90f1c22f96174ec1047ceb8272f2f6040cb5bd63d8f9f2b + languageName: node + linkType: hard + +"lodash.trimend@npm:^4.5.1": + version: 4.5.1 + resolution: "lodash.trimend@npm:4.5.1" + checksum: 8d0c013e95529f6b8af0cbe987a730a4befdd1ab3674ae72199731109929d3ed9892217fdb282361a4cdd78c3a1d3aa7d6aadd313dd3c38b61248fb60e2f6627 + languageName: node + linkType: hard + +"lodash.trimstart@npm:^4.5.1": + version: 4.5.1 + resolution: "lodash.trimstart@npm:4.5.1" + checksum: 4b2d37505ac15f501f4f2378928455a40e858fa56c924494dbc21d5d828c55e821cda8543f25fe265e3d552937e915264a2567ba9291a172262c24c33e9ad6b0 + languageName: node + linkType: hard + "lodash.truncate@npm:^4.4.2": version: 4.4.2 resolution: "lodash.truncate@npm:4.4.2" @@ -12418,6 +13431,20 @@ __metadata: languageName: node linkType: hard +"lodash.uppercase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.uppercase@npm:4.3.0" + checksum: 0a435cccd3acfe732c968deb4897d6237051d69f58f18e55e7faa781b1731176012e3286505780e93a4e0acb93a6799e39908c7ea3367678bdd2aecb963f469d + languageName: node + linkType: hard + +"lodash.upperfirst@npm:^4.3.1": + version: 4.3.1 + resolution: "lodash.upperfirst@npm:4.3.1" + checksum: cadec6955900afe1928cc60cdc4923a79c2ef991e42665419cc81630ed9b4f952a1093b222e0141ab31cbc4dba549f97ec28ff67929d71e01861c97188a5fa83 + languageName: node + linkType: hard + "lodash@npm:4.17.20": version: 4.17.20 resolution: "lodash@npm:4.17.20" @@ -12432,7 +13459,7 @@ __metadata: languageName: node linkType: hard -"log-symbols@npm:3.0.0": +"log-symbols@npm:3.0.0, log-symbols@npm:^3.0.0": version: 3.0.0 resolution: "log-symbols@npm:3.0.0" dependencies: @@ -12463,6 +13490,13 @@ __metadata: languageName: node linkType: hard +"long@npm:^4.0.0": + version: 4.0.0 + resolution: "long@npm:4.0.0" + checksum: 16afbe8f749c7c849db1f4de4e2e6a31ac6e617cead3bdc4f9605cb703cd20e1e9fc1a7baba674ffcca57d660a6e5b53a9e236d7b25a295d3855cca79cc06744 + languageName: node + linkType: hard + "looper@npm:^2.0.0": version: 2.0.0 resolution: "looper@npm:2.0.0" @@ -12585,6 +13619,24 @@ __metadata: languageName: node linkType: hard +"mafmt@npm:^6.0.2": + version: 6.0.10 + resolution: "mafmt@npm:6.0.10" + dependencies: + multiaddr: ^6.1.0 + checksum: 11e0009e4ae5159163b4903dcfb95ca816ef486d3ba421560a7a85278669246b01013090d24e37669fbf7ca49b0deaa1da0cbf71e0a64e3504f63cf384b1fe0d + languageName: node + linkType: hard + +"mafmt@npm:^7.0.0": + version: 7.1.0 + resolution: "mafmt@npm:7.1.0" + dependencies: + multiaddr: ^7.3.0 + checksum: 5d891f2007e99e6bee0b741b07f65ab81c4bce4a0baab08d97f2b34a72a0b7647e3b6a36a3377162adf56faed18be9a62bc772ef64a4f15e65ea4d034be705f0 + languageName: node + linkType: hard + "magic-string@npm:^0.25.7": version: 0.25.9 resolution: "magic-string@npm:0.25.9" @@ -12987,7 +14039,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:2 || 3, minimatch@npm:^3.0.4, minimatch@npm:^3.1.2": +"minimatch@npm:2 || 3, minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -13304,6 +14356,34 @@ __metadata: languageName: node linkType: hard +"multiaddr@npm:^6.0.3, multiaddr@npm:^6.0.6, multiaddr@npm:^6.1.0": + version: 6.1.1 + resolution: "multiaddr@npm:6.1.1" + dependencies: + bs58: ^4.0.1 + class-is: ^1.1.0 + hi-base32: ~0.5.0 + ip: ^1.1.5 + is-ip: ^2.0.0 + varint: ^5.0.0 + checksum: cf16157d49fca288ae69f02c4064a07869d33c97f9973b47b016887d6f025fe2271242b6f63d91939c3720979caa938cf95a9a2615556d29d21a4a19ecb01a89 + languageName: node + linkType: hard + +"multiaddr@npm:^7.2.1, multiaddr@npm:^7.3.0": + version: 7.5.0 + resolution: "multiaddr@npm:7.5.0" + dependencies: + buffer: ^5.5.0 + cids: ~0.8.0 + class-is: ^1.1.0 + is-ip: ^3.1.0 + multibase: ^0.7.0 + varint: ^5.0.0 + checksum: b1228f75af074f7797c37e5701c32732ccbb8828543d24f1a4b39a164c9407d8ae3a6783860fffd5956939d34acf21f76dae426c2dd6f5f598482c70eeae31cc + languageName: node + linkType: hard + "multibase@npm:^0.7.0": version: 0.7.0 resolution: "multibase@npm:0.7.0" @@ -13314,6 +14394,16 @@ __metadata: languageName: node linkType: hard +"multibase@npm:^1.0.0, multibase@npm:^1.0.1": + version: 1.0.1 + resolution: "multibase@npm:1.0.1" + dependencies: + base-x: ^3.0.8 + buffer: ^5.5.0 + checksum: 5d34398f81dca137aafe65a171ed5d637cf789bebb4fd33e11c186bfecbe6435a3d4f5c0cf15282607215ccc3a55ff4150a42067e7bc7756a42554e5fbc6d0d5 + languageName: node + linkType: hard + "multibase@npm:~0.6.0": version: 0.6.1 resolution: "multibase@npm:0.6.1" @@ -13324,7 +14414,7 @@ __metadata: languageName: node linkType: hard -"multicodec@npm:^0.5.5": +"multicodec@npm:^0.5.5, multicodec@npm:~0.5.1": version: 0.5.7 resolution: "multicodec@npm:0.5.7" dependencies: @@ -13333,24 +14423,89 @@ __metadata: languageName: node linkType: hard -"multicodec@npm:^1.0.0": - version: 1.0.4 - resolution: "multicodec@npm:1.0.4" +"multicodec@npm:^1.0.0, multicodec@npm:^1.0.1": + version: 1.0.4 + resolution: "multicodec@npm:1.0.4" + dependencies: + buffer: ^5.6.0 + varint: ^5.0.0 + checksum: e6a2916fa76c023b1c90b32ae74f8a781cf0727f71660b245a5ed1db46add6f2ce1586bee5713b16caf0a724e81bfe0678d89910c20d3bb5fd9649dacb2be79e + languageName: node + linkType: hard + +"multihashes@npm:^0.4.15, multihashes@npm:~0.4.13, multihashes@npm:~0.4.14, multihashes@npm:~0.4.15": + version: 0.4.21 + resolution: "multihashes@npm:0.4.21" + dependencies: + buffer: ^5.5.0 + multibase: ^0.7.0 + varint: ^5.0.0 + checksum: 688731560cf7384e899dc75c0da51e426eb7d058c5ea5eb57b224720a1108deb8797f1cd7f45599344d512d2877de99dd6a7b7773a095812365dea4ffe6ebd4c + languageName: node + linkType: hard + +"multihashes@npm:^1.0.1": + version: 1.0.1 + resolution: "multihashes@npm:1.0.1" + dependencies: + buffer: ^5.6.0 + multibase: ^1.0.1 + varint: ^5.0.0 + checksum: 21e338dfb23900f7c038ac708fab598b33bc3d8d02f636ff753969c575b934f979dec76936ca142c6fd126a8bd030f7f391a44a3681c92cab28311c8b0b70589 + languageName: node + linkType: hard + +"multihashing-async@npm:~0.5.1": + version: 0.5.2 + resolution: "multihashing-async@npm:0.5.2" + dependencies: + blakejs: ^1.1.0 + js-sha3: ~0.8.0 + multihashes: ~0.4.13 + murmurhash3js: ^3.0.1 + nodeify: ^1.0.1 + checksum: a0f42f80b91cdfa6195a59ff77f928c389e469b85bf99a10e36c7e2ee79265827ea1716f4c572531ffb7fe396efe0298a565b52f9491f057c5411ae758e501ca + languageName: node + linkType: hard + +"multihashing-async@npm:~0.6.0": + version: 0.6.0 + resolution: "multihashing-async@npm:0.6.0" + dependencies: + blakejs: ^1.1.0 + js-sha3: ~0.8.0 + multihashes: ~0.4.13 + murmurhash3js: ^3.0.1 + nodeify: ^1.0.1 + checksum: a196692c249969de62243c9b66b859f852b3b9514c61208d8381a36c534b42ff53b54a9f1f7e50878aa93326f9b616deac9e2e5e1f396fe5829d7683b0dd1deb + languageName: node + linkType: hard + +"multihashing-async@npm:~0.7.0": + version: 0.7.0 + resolution: "multihashing-async@npm:0.7.0" dependencies: - buffer: ^5.6.0 - varint: ^5.0.0 - checksum: e6a2916fa76c023b1c90b32ae74f8a781cf0727f71660b245a5ed1db46add6f2ce1586bee5713b16caf0a724e81bfe0678d89910c20d3bb5fd9649dacb2be79e + blakejs: ^1.1.0 + buffer: ^5.2.1 + err-code: ^1.1.2 + js-sha3: ~0.8.0 + multihashes: ~0.4.13 + murmurhash3js-revisited: ^3.0.0 + checksum: 0b521893827a309eadb95063c57677b2bf1e078d730beb3ae2e50e9a8e37b646209e51b6b118851316933527d829aa0f2f306207fdd709016abdea209b64fa33 languageName: node linkType: hard -"multihashes@npm:^0.4.15, multihashes@npm:~0.4.15": - version: 0.4.21 - resolution: "multihashes@npm:0.4.21" +"multihashing-async@npm:~0.8.0": + version: 0.8.2 + resolution: "multihashing-async@npm:0.8.2" dependencies: - buffer: ^5.5.0 - multibase: ^0.7.0 - varint: ^5.0.0 - checksum: 688731560cf7384e899dc75c0da51e426eb7d058c5ea5eb57b224720a1108deb8797f1cd7f45599344d512d2877de99dd6a7b7773a095812365dea4ffe6ebd4c + blakejs: ^1.1.0 + buffer: ^5.4.3 + err-code: ^2.0.0 + js-sha3: ^0.8.0 + multihashes: ^1.0.1 + murmurhash3js-revisited: ^3.0.0 + checksum: eabe9d22d49b9df54f33c23493acc7a65ea520b11b81aea7fd3d5a12aa5a35d4aa4c02bf023d791baf2952e2f2c748da498a9b405b85ae8e13b1bde6637f4b94 languageName: node linkType: hard @@ -13378,6 +14533,20 @@ __metadata: languageName: node linkType: hard +"murmurhash3js-revisited@npm:^3.0.0": + version: 3.0.0 + resolution: "murmurhash3js-revisited@npm:3.0.0" + checksum: 24b60657ce296b1d3cf358af70688c8ed777e93c4ee263967f066a4adb0ade0d689863a1a51adc74ab134d61a877f41a06e2b73842ac3fc924799cc96b249a40 + languageName: node + linkType: hard + +"murmurhash3js@npm:^3.0.1": + version: 3.0.1 + resolution: "murmurhash3js@npm:3.0.1" + checksum: 8111d0d94bcd7b61d8b47d69e798a3ba4323c8a639cd789ad6259e9e8f319565451b9e1164d321db0b36b1f067202e34532288da4bb587b449052ff677d5281c + languageName: node + linkType: hard + "mute-stream@npm:0.0.7": version: 0.0.7 resolution: "mute-stream@npm:0.0.7" @@ -13385,6 +14554,13 @@ __metadata: languageName: node linkType: hard +"mute-stream@npm:0.0.8": + version: 0.0.8 + resolution: "mute-stream@npm:0.0.8" + checksum: ff48d251fc3f827e5b1206cda0ffdaec885e56057ee86a3155e1951bc940fd5f33531774b1cc8414d7668c10a8907f863f6561875ee6e8768931a62121a531a1 + languageName: node + linkType: hard + "nan@npm:^2.14.0, nan@npm:^2.14.2": version: 2.15.0 resolution: "nan@npm:2.15.0" @@ -13454,6 +14630,20 @@ __metadata: languageName: node linkType: hard +"ndjson@github:hugomrdias/ndjson#feat/readable-stream3": + version: 1.5.0 + resolution: "ndjson@https://github.com/hugomrdias/ndjson.git#commit=4db16da6b42e5b39bf300c3a7cde62abb3fa3a11" + dependencies: + json-stringify-safe: ^5.0.1 + minimist: ^1.2.0 + split2: ^3.1.0 + through2: ^3.0.0 + bin: + ndjson: cli.js + checksum: dbcf1e361e216c7f8c2bad796f23087966b75429e929890ae1e3f57f00a5df2cabed89c4d55d067934ed4e4c9ed3ac5991ed44d2e08cfc4bc9e50ae2c5b66dce + languageName: node + linkType: hard + "negotiator@npm:0.6.3, negotiator@npm:^0.6.3": version: 0.6.3 resolution: "negotiator@npm:0.6.3" @@ -13529,6 +14719,13 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:2.6.0": + version: 2.6.0 + resolution: "node-fetch@npm:2.6.0" + checksum: 2b741e9315c1c07df4a291d0b304892fa7e8d623fe789fedd53f9bcb8d09102b07591b4b93e552a65dfc457eee9d5d879d0440aefdb64f2d78e7cb78cbad28e9 + languageName: node + linkType: hard + "node-fetch@npm:2.6.1": version: 2.6.1 resolution: "node-fetch@npm:2.6.1" @@ -13536,7 +14733,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.1": +"node-fetch@npm:^2.3.0, node-fetch@npm:^2.6.1": version: 2.6.7 resolution: "node-fetch@npm:2.6.7" dependencies: @@ -13560,6 +14757,13 @@ __metadata: languageName: node linkType: hard +"node-forge@npm:^0.10.0": + version: 0.10.0 + resolution: "node-forge@npm:0.10.0" + checksum: 5aa6dc9922e424a20ef101d2f517418e2bc9cfc0255dd22e0701c0fad1568445f510ee67f6f3fcdf085812c4ca1b847b8ba45683b34776828e41f5c1794e42e1 + languageName: node + linkType: hard + "node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.2.3, node-gyp-build@npm:^4.3.0": version: 4.3.0 resolution: "node-gyp-build@npm:4.3.0" @@ -13598,6 +14802,16 @@ __metadata: languageName: node linkType: hard +"nodeify@npm:^1.0.1": + version: 1.0.1 + resolution: "nodeify@npm:1.0.1" + dependencies: + is-promise: ~1.0.0 + promise: ~1.3.0 + checksum: 2d61f77a43ba0d580fc9615c5112d891605baa56f13d871a9f9736a92a80d974f77fa9ad3a4698214929216e79f583c18fd17e6363934f73d39cc69319f244de + languageName: node + linkType: hard + "nopt@npm:3.x": version: 3.0.6 resolution: "nopt@npm:3.0.6" @@ -13686,7 +14900,7 @@ __metadata: languageName: node linkType: hard -"npm-run-path@npm:^4.0.1": +"npm-run-path@npm:^4.0.0, npm-run-path@npm:^4.0.1": version: 4.0.1 resolution: "npm-run-path@npm:4.0.1" dependencies: @@ -13747,6 +14961,13 @@ __metadata: languageName: node linkType: hard +"object-assign@npm:^2.0.0": + version: 2.1.1 + resolution: "object-assign@npm:2.1.1" + checksum: d37a7d7173408e07ee225116437592d92b584b2a5f38cafe608400b43efd9b78878dbd545b524aff5b4118d88e39466b9038b2d3de8885e212adad497d656c46 + languageName: node + linkType: hard + "object-assign@npm:^4, object-assign@npm:^4.0.0, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1": version: 4.1.1 resolution: "object-assign@npm:4.1.1" @@ -13970,6 +15191,15 @@ __metadata: languageName: node linkType: hard +"optimist@npm:~0.3.5": + version: 0.3.7 + resolution: "optimist@npm:0.3.7" + dependencies: + wordwrap: ~0.0.2 + checksum: adc02acb8b76d242e56714b47c8c96916b25a5ac2da7b9f735e1f946a970f266f71d53eff0b61d9582ef948301e94734f03b784fa7c309aed0fe7db403d22046 + languageName: node + linkType: hard + "optionator@npm:^0.8.1, optionator@npm:^0.8.2": version: 0.8.3 resolution: "optionator@npm:0.8.3" @@ -13998,6 +15228,22 @@ __metadata: languageName: node linkType: hard +"ora@npm:^4.0.0": + version: 4.1.1 + resolution: "ora@npm:4.1.1" + dependencies: + chalk: ^3.0.0 + cli-cursor: ^3.1.0 + cli-spinners: ^2.2.0 + is-interactive: ^1.0.0 + log-symbols: ^3.0.0 + mute-stream: 0.0.8 + strip-ansi: ^6.0.0 + wcwidth: ^1.0.1 + checksum: 5dcee3a2e143c7b578531ceda051e8c4b64655a019030fe3de4aef67ac28d08fca996aef71522d40b2316a272aa158d65028d7f43c126d318b70a49d9fa4f991 + languageName: node + linkType: hard + "ordered-binary@npm:^1.2.4": version: 1.2.4 resolution: "ordered-binary@npm:1.2.4" @@ -14049,6 +15295,13 @@ __metadata: languageName: node linkType: hard +"p-finally@npm:^2.0.0": + version: 2.0.1 + resolution: "p-finally@npm:2.0.1" + checksum: 6306a2851c3b28f8b603624f395ae84dce76970498fed8aa6aae2d930595053746edf1e4ee0c4b78a97410d84aa4504d63179f5310d555511ecd226f53ed1e8e + languageName: node + linkType: hard + "p-limit@npm:^1.1.0": version: 1.3.0 resolution: "p-limit@npm:1.3.0" @@ -14433,6 +15686,43 @@ __metadata: languageName: node linkType: hard +"peer-id@npm:~0.12.2, peer-id@npm:~0.12.3": + version: 0.12.5 + resolution: "peer-id@npm:0.12.5" + dependencies: + async: ^2.6.3 + class-is: ^1.1.0 + libp2p-crypto: ~0.16.1 + multihashes: ~0.4.15 + bin: + peer-id: src/bin.js + checksum: 4feaeb6d947ab9f920bef8367016e708e6382de4c7f7813539d64a416e6f5a1876f505414c28535029412af005bd8d1b953982a1d15a220695ca3fbb94338550 + languageName: node + linkType: hard + +"peer-info@npm:~0.15.1": + version: 0.15.1 + resolution: "peer-info@npm:0.15.1" + dependencies: + mafmt: ^6.0.2 + multiaddr: ^6.0.3 + peer-id: ~0.12.2 + unique-by: ^1.0.0 + checksum: b1152d63da462cccdb49c4605afdd9146a43990557e766ff34cb9bb9db065b1a305370ad49ab37802d2f86df9a49d83f173bab577f4de8bd22d41cf74cc4092c + languageName: node + linkType: hard + +"pem-jwk@npm:^2.0.0": + version: 2.0.0 + resolution: "pem-jwk@npm:2.0.0" + dependencies: + asn1.js: ^5.0.1 + bin: + pem-jwk: ./bin/pem-jwk.js + checksum: 63516b8ba44989bd68d1c7f8ee97ba1d965d0b63ef560ba784f1a19f88ee1f89b4bf7fcc9e5dc8f44dd0374acf874be0bf44c8cbcfe09dac11fd21137224b16d + languageName: node + linkType: hard + "performance-now@npm:^2.1.0": version: 2.1.0 resolution: "performance-now@npm:2.1.0" @@ -14507,6 +15797,13 @@ __metadata: languageName: node linkType: hard +"pkginfo@npm:0.4.1": + version: 0.4.1 + resolution: "pkginfo@npm:0.4.1" + checksum: 0f13694f3682345647b7cb887fb6fe258df51b635f252324cd75eeb8181b4381cb8b9d91dc2d869849e857192b403bea65038d2f7c05b524eeae69ece5048209 + languageName: node + linkType: hard + "please-upgrade-node@npm:^3.2.0": version: 3.2.0 resolution: "please-upgrade-node@npm:3.2.0" @@ -14516,6 +15813,13 @@ __metadata: languageName: node linkType: hard +"pluralize@npm:^8.0.0": + version: 8.0.0 + resolution: "pluralize@npm:8.0.0" + checksum: 08931d4a6a4a5561a7f94f67a31c17e6632cb21e459ab3ff4f6f629d9a822984cf8afef2311d2005fbea5d7ef26016ebb090db008e2d8bce39d0a9a9d218736e + languageName: node + linkType: hard + "posix-character-classes@npm:^0.1.0": version: 0.1.1 resolution: "posix-character-classes@npm:0.1.1" @@ -15013,7 +16317,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^1.14.3": +"prettier@npm:1.19.1, prettier@npm:^1.14.3": version: 1.19.1 resolution: "prettier@npm:1.19.1" bin: @@ -15085,6 +16389,13 @@ __metadata: languageName: node linkType: hard +"promise-nodeify@npm:^3.0.1": + version: 3.0.1 + resolution: "promise-nodeify@npm:3.0.1" + checksum: 9c600028f7713c6d5393a1e183dec46d028e9e8801838ce1940d7c327ae8d5fe6aad54a4590abd4d55715db9c605b1fdf24bc4db972a92298fdba4cb048abc77 + languageName: node + linkType: hard + "promise-retry@npm:^2.0.1": version: 2.0.1 resolution: "promise-retry@npm:2.0.1" @@ -15114,6 +16425,22 @@ __metadata: languageName: node linkType: hard +"promise@npm:~1.3.0": + version: 1.3.0 + resolution: "promise@npm:1.3.0" + dependencies: + is-promise: ~1 + checksum: f7b0264e2591bbcd557141c86407c3754266b5229d5ca401162de0e6a174a7c7fd9123458d4c9c2976d9b94a2d36673c146c3f8cb0106ad68476421f32a8d9ec + languageName: node + linkType: hard + +"promisify-es6@npm:^1.0.3": + version: 1.0.3 + resolution: "promisify-es6@npm:1.0.3" + checksum: 5dc19b4025e341547a5a63ec5edf89b212d93415f7626618673ddbbfae926fa2bfb85b4ad4cf67ebba7c3e842fc0fcf0318e66cd1c7210d4ca090722bab059d1 + languageName: node + linkType: hard + "prop-types@npm:^15.5.10, prop-types@npm:^15.6.1, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" @@ -15125,6 +16452,25 @@ __metadata: languageName: node linkType: hard +"protocol-buffers-schema@npm:^3.3.1": + version: 3.6.0 + resolution: "protocol-buffers-schema@npm:3.6.0" + checksum: 8713b5770f6745ddbcdf3bbd03ee020624d506233bb567927a6615a6f69a5bd620a5f49597f34f4115792b853a4c9cb9e2d5d6b930a1c04bf198023e45c1c349 + languageName: node + linkType: hard + +"protons@npm:^1.0.1": + version: 1.2.1 + resolution: "protons@npm:1.2.1" + dependencies: + buffer: ^5.5.0 + protocol-buffers-schema: ^3.3.1 + signed-varint: ^2.0.1 + varint: ^5.0.0 + checksum: bbbb472f9e55616456db440d7738d8b098fdc80c475adc592be2fa726f8631edd71ef705714ff2ec74f79c9f60e7507e6bd176073c37e324cdfb4fa002a2c45a + languageName: node + linkType: hard + "proxy-addr@npm:~2.0.7": version: 2.0.7 resolution: "proxy-addr@npm:2.0.7" @@ -15177,7 +16523,7 @@ __metadata: languageName: node linkType: hard -"pull-defer@npm:^0.2.2": +"pull-defer@npm:^0.2.2, pull-defer@npm:~0.2.3": version: 0.2.3 resolution: "pull-defer@npm:0.2.3" checksum: 4ea99ed64a2d79167e87293aba5088cde91f210a319c690a65aa6704d829be33b76cecc732f8d4ed3eee47e7eb09a6f77042897ea6414862bacbd722ce182d66 @@ -15216,13 +16562,22 @@ __metadata: languageName: node linkType: hard -"pull-stream@npm:^3.2.3, pull-stream@npm:^3.4.0, pull-stream@npm:^3.6.8": +"pull-stream@npm:^3.2.3, pull-stream@npm:^3.4.0, pull-stream@npm:^3.6.8, pull-stream@npm:^3.6.9": version: 3.6.14 resolution: "pull-stream@npm:3.6.14" checksum: fc3d86d488894cdf1f980848886be54d8c9cf16a982e9f651098e673bf0134dd1be9b02435f59afe5b48d479c6bafb828348f7fac95fd4593633bffefdfb7503 languageName: node linkType: hard +"pull-to-stream@npm:~0.1.1": + version: 0.1.1 + resolution: "pull-to-stream@npm:0.1.1" + dependencies: + readable-stream: ^3.1.1 + checksum: 90a4ddc4f1208cae2c1d02b8d4dac032f8e5e4c202b37f113b67afa2499c89e08101de172d6155e0dde953fbcb378432dfaf5077cb6e5835faeff8159f996c29 + languageName: node + linkType: hard + "pull-window@npm:^2.1.4": version: 2.1.4 resolution: "pull-window@npm:2.1.4" @@ -15232,6 +16587,16 @@ __metadata: languageName: node linkType: hard +"pump@npm:^1.0.0": + version: 1.0.3 + resolution: "pump@npm:1.0.3" + dependencies: + end-of-stream: ^1.1.0 + once: ^1.3.1 + checksum: 61fe58694f9900020a5cf5bc765d74396891c201afecf06659df2f5874fd832be4e19e2f95cc72d8b9eb98ace0a4db3cebf7343f9fc893a930577be29e3ad8b5 + languageName: node + linkType: hard + "pump@npm:^3.0.0": version: 3.0.0 resolution: "pump@npm:3.0.0" @@ -15277,7 +16642,7 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.4.0, qs@npm:^6.7.0, qs@npm:^6.9.4": +"qs@npm:^6.4.0, qs@npm:^6.5.2, qs@npm:^6.7.0, qs@npm:^6.9.4": version: 6.10.3 resolution: "qs@npm:6.10.3" dependencies: @@ -15334,6 +16699,29 @@ __metadata: languageName: node linkType: hard +"ramda@npm:^0.24.1": + version: 0.24.1 + resolution: "ramda@npm:0.24.1" + checksum: c2dc048f5a0f61872eec7925f76cdf8e7b7cf7a4f457e274d915d8bf86bd108938795d92061d56eae315a4818ea65276a87c9db336356191aaf879647afd8c82 + languageName: node + linkType: hard + +"ramda@npm:^0.25.0": + version: 0.25.0 + resolution: "ramda@npm:0.25.0" + checksum: 008abbcc69aefd89a2a4a0c9f4cf9f8da2ec490a0e1e261b4c88de8540ef0c383d469bfdf71b758b559377c71bfa8efea164fdb1779169359a86b46f7cb23cb1 + languageName: node + linkType: hard + +"ramdasauce@npm:^2.1.0": + version: 2.1.3 + resolution: "ramdasauce@npm:2.1.3" + dependencies: + ramda: ^0.24.1 + checksum: e4b7be3b7dd9f0b986a99ec5946a980e26be550644957980c05d518e158512175bf0027b12d300d87dfb600ad8c548888c551e1836dd0a2c42735dda7dccca1a + languageName: node + linkType: hard + "randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5, randombytes@npm:^2.0.6, randombytes@npm:^2.1.0": version: 2.1.0 resolution: "randombytes@npm:2.1.0" @@ -15633,7 +17021,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.0, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": +"readable-stream@npm:2 || 3, readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.1, readable-stream@npm:^3.0.2, readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.0, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": version: 3.6.0 resolution: "readable-stream@npm:3.6.0" dependencies: @@ -15656,7 +17044,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.5, readable-stream@npm:^2.2.2, readable-stream@npm:^2.2.8, readable-stream@npm:^2.2.9, readable-stream@npm:^2.3.6, readable-stream@npm:~2.3.6": +"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.5, readable-stream@npm:^2.2.2, readable-stream@npm:^2.2.8, readable-stream@npm:^2.2.9, readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5, readable-stream@npm:^2.3.6, readable-stream@npm:~2.3.6": version: 2.3.7 resolution: "readable-stream@npm:2.3.7" dependencies: @@ -15671,7 +17059,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:~1.0.15": +"readable-stream@npm:~1.0.15, readable-stream@npm:~1.0.26-4": version: 1.0.34 resolution: "readable-stream@npm:1.0.34" dependencies: @@ -15701,6 +17089,15 @@ __metadata: languageName: node linkType: hard +"readdirp@npm:~3.5.0": + version: 3.5.0 + resolution: "readdirp@npm:3.5.0" + dependencies: + picomatch: ^2.2.1 + checksum: 6b1a9341e295e15d4fb40c010216cbcb6266587cd0b3ce7defabd66fa1b4e35f9fba3d64c2187fd38fadd01ccbfc5f1b33fdfb1da63b3cbf66224b7c6d75ce5a + languageName: node + linkType: hard + "rechoir@npm:^0.6.2": version: 0.6.2 resolution: "rechoir@npm:0.6.2" @@ -15923,7 +17320,7 @@ __metadata: languageName: node linkType: hard -"request@npm:^2.79.0, request@npm:^2.85.0, request@npm:^2.88.0": +"request@npm:2.88.2, request@npm:^2.79.0, request@npm:^2.85.0, request@npm:^2.88.0": version: 2.88.2 resolution: "request@npm:2.88.2" dependencies: @@ -16192,7 +17589,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:3.0.2, rimraf@npm:^3.0.2": +"rimraf@npm:3.0.2, rimraf@npm:^3.0.0, rimraf@npm:^3.0.2": version: 3.0.2 resolution: "rimraf@npm:3.0.2" dependencies: @@ -16235,6 +17632,27 @@ __metadata: languageName: node linkType: hard +"rsa-pem-to-jwk@npm:^1.1.3": + version: 1.1.3 + resolution: "rsa-pem-to-jwk@npm:1.1.3" + dependencies: + object-assign: ^2.0.0 + rsa-unpack: 0.0.6 + checksum: f9ca4a05147d7c1a92e72b0ca30a994706c7bb267cb157c41043be47616bb1d4b46b47f8864fa9ab0f7ab1f9f3733e7539325ff6c8c88a80b167c3c2d90b3565 + languageName: node + linkType: hard + +"rsa-unpack@npm:0.0.6": + version: 0.0.6 + resolution: "rsa-unpack@npm:0.0.6" + dependencies: + optimist: ~0.3.5 + bin: + rsa-unpack: bin/cmd.js + checksum: abf7d37e8704412c599401dd51ea32ea3cd3cba83d2f9514d0c1d0a2739942cc33c38443a07137039a9034c16471ccbf23314d5abe7e9ecb31db90f9fbd178d8 + languageName: node + linkType: hard + "run-async@npm:^2.2.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" @@ -16405,7 +17823,7 @@ __metadata: languageName: node linkType: hard -"secp256k1@npm:^3.0.1": +"secp256k1@npm:^3.0.1, secp256k1@npm:^3.6.2": version: 3.8.0 resolution: "secp256k1@npm:3.8.0" dependencies: @@ -16471,7 +17889,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.3.5, semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5": +"semver@npm:7.3.5, semver@npm:^7.0.0, semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5": version: 7.3.5 resolution: "semver@npm:7.3.5" dependencies: @@ -16701,6 +18119,15 @@ __metadata: languageName: node linkType: hard +"signed-varint@npm:^2.0.1": + version: 2.0.1 + resolution: "signed-varint@npm:2.0.1" + dependencies: + varint: ~5.0.0 + checksum: a9fd2d954d62149d5dcbf7292c028d5665046763bd3e2b68f5603fca9248c808ca727f0b70e8e785d292c40f6a43b7406d56a37c7b06becd3c6ad0972c5d0e94 + languageName: node + linkType: hard + "simple-concat@npm:^1.0.0": version: 1.0.1 resolution: "simple-concat@npm:1.0.1" @@ -17118,6 +18545,13 @@ __metadata: languageName: node linkType: hard +"split-ca@npm:^1.0.0": + version: 1.0.1 + resolution: "split-ca@npm:1.0.1" + checksum: 1e7409938a95ee843fe2593156a5735e6ee63772748ee448ea8477a5a3e3abde193c3325b3696e56a5aff07c7dcf6b1f6a2f2a036895b4f3afe96abb366d893f + languageName: node + linkType: hard + "split-string@npm:^3.0.1, split-string@npm:^3.0.2": version: 3.1.0 resolution: "split-string@npm:3.1.0" @@ -17127,7 +18561,7 @@ __metadata: languageName: node linkType: hard -"split2@npm:^3.0.0": +"split2@npm:^3.0.0, split2@npm:^3.1.0": version: 3.2.2 resolution: "split2@npm:3.2.2" dependencies: @@ -17182,7 +18616,7 @@ __metadata: languageName: node linkType: hard -"stable@npm:^0.1.8": +"stable@npm:^0.1.8, stable@npm:~0.1.8": version: 0.1.8 resolution: "stable@npm:0.1.8" checksum: 2ff482bb100285d16dd75cd8f7c60ab652570e8952c0bfa91828a2b5f646a0ff533f14596ea4eabd48bb7f4aeea408dce8f8515812b975d958a4cc4fa6b9dfeb @@ -17229,7 +18663,7 @@ __metadata: languageName: node linkType: hard -"stream-to-pull-stream@npm:^1.7.1": +"stream-to-pull-stream@npm:^1.7.1, stream-to-pull-stream@npm:^1.7.2": version: 1.7.3 resolution: "stream-to-pull-stream@npm:1.7.3" dependencies: @@ -17361,7 +18795,7 @@ __metadata: languageName: node linkType: hard -"string_decoder@npm:^1.1.1": +"string_decoder@npm:^1.1.1, string_decoder@npm:^1.2.0": version: 1.3.0 resolution: "string_decoder@npm:1.3.0" dependencies: @@ -17624,7 +19058,7 @@ __metadata: languageName: node linkType: hard -"sync-request@npm:^6.0.0": +"sync-request@npm:6.1.0, sync-request@npm:^6.0.0": version: 6.1.0 resolution: "sync-request@npm:6.1.0" dependencies: @@ -17713,6 +19147,46 @@ __metadata: languageName: node linkType: hard +"tar-fs@npm:~1.16.3": + version: 1.16.3 + resolution: "tar-fs@npm:1.16.3" + dependencies: + chownr: ^1.0.1 + mkdirp: ^0.5.1 + pump: ^1.0.0 + tar-stream: ^1.1.2 + checksum: 0c78aa173cde0df44e5fbbd85077240b8340444bff5ec026539e9e20806ca31b5d4b8cee58befe5c1dae7fa47cd1bb3f9a0efebf2212c2bfbad31f23de329c79 + languageName: node + linkType: hard + +"tar-stream@npm:^1.1.2": + version: 1.6.2 + resolution: "tar-stream@npm:1.6.2" + dependencies: + bl: ^1.0.0 + buffer-alloc: ^1.2.0 + end-of-stream: ^1.0.0 + fs-constants: ^1.0.0 + readable-stream: ^2.3.0 + to-buffer: ^1.1.1 + xtend: ^4.0.0 + checksum: a5d49e232d3e33321bbd150381b6a4e5046bf12b1c2618acb95435b7871efde4d98bd1891eb2200478a7142ef7e304e033eb29bbcbc90451a2cdfa1890e05245 + languageName: node + linkType: hard + +"tar-stream@npm:^2.0.1": + version: 2.2.0 + resolution: "tar-stream@npm:2.2.0" + dependencies: + bl: ^4.0.3 + end-of-stream: ^1.4.1 + fs-constants: ^1.0.0 + inherits: ^2.0.3 + readable-stream: ^3.1.1 + checksum: 699831a8b97666ef50021c767f84924cfee21c142c2eb0e79c63254e140e6408d6d55a065a2992548e72b06de39237ef2b802b99e3ece93ca3904a37622a66f3 + languageName: node + linkType: hard + "tar@npm:^4.0.2": version: 4.4.19 resolution: "tar@npm:4.4.19" @@ -17728,7 +19202,7 @@ __metadata: languageName: node linkType: hard -"tar@npm:^6.1.11, tar@npm:^6.1.2": +"tar@npm:^6.1.0, tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.1.11 resolution: "tar@npm:6.1.11" dependencies: @@ -17855,6 +19329,16 @@ __metadata: languageName: node linkType: hard +"through2@npm:^3.0.0, through2@npm:^3.0.1": + version: 3.0.2 + resolution: "through2@npm:3.0.2" + dependencies: + inherits: ^2.0.4 + readable-stream: 2 || 3 + checksum: 47c9586c735e7d9cbbc1029f3ff422108212f7cc42e06d5cc9fff7901e659c948143c790e0d0d41b1b5f89f1d1200bdd200c7b72ad34f42f9edbeb32ea49e8b7 + languageName: node + linkType: hard + "through2@npm:^4.0.0": version: 4.0.2 resolution: "through2@npm:4.0.2" @@ -17885,6 +19369,15 @@ __metadata: languageName: node linkType: hard +"tmp-promise@npm:3.0.2": + version: 3.0.2 + resolution: "tmp-promise@npm:3.0.2" + dependencies: + tmp: ^0.2.0 + checksum: 2d8457c9512e896633f64fab33e5e3fd273c4d8fca33cfc74a04a104a0b921d15ed3e832c4f2a50108635ac88264afef85abddbe5ad8480e15f55fc7f8e76969 + languageName: node + linkType: hard + "tmp@npm:0.0.33, tmp@npm:^0.0.33": version: 0.0.33 resolution: "tmp@npm:0.0.33" @@ -17903,6 +19396,22 @@ __metadata: languageName: node linkType: hard +"tmp@npm:^0.2.0": + version: 0.2.1 + resolution: "tmp@npm:0.2.1" + dependencies: + rimraf: ^3.0.0 + checksum: 8b1214654182575124498c87ca986ac53dc76ff36e8f0e0b67139a8d221eaecfdec108c0e6ec54d76f49f1f72ab9325500b246f562b926f85bcdfca8bf35df9e + languageName: node + linkType: hard + +"to-buffer@npm:^1.1.1": + version: 1.1.1 + resolution: "to-buffer@npm:1.1.1" + checksum: 6c897f58c2bdd8b8b1645ea515297732fec6dafb089bf36d12370c102ff5d64abf2be9410e0b1b7cfc707bada22d9a4084558010bfc78dd7023748dc5dd9a1ce + languageName: node + linkType: hard + "to-fast-properties@npm:^1.0.3": version: 1.0.3 resolution: "to-fast-properties@npm:1.0.3" @@ -18464,6 +19973,13 @@ __metadata: languageName: node linkType: hard +"unique-by@npm:^1.0.0": + version: 1.0.0 + resolution: "unique-by@npm:1.0.0" + checksum: 107f42e5b60e2d7217a1e045863024affb8d95d18d29b7c80a808473acd7a5c805ec24a791e5d598fa5a7b01ca02c5f7616dd2574b2d00bd44009c7b1e996dd4 + languageName: node + linkType: hard + "unique-filename@npm:^1.1.1": version: 1.1.1 resolution: "unique-filename@npm:1.1.1" @@ -18489,6 +20005,13 @@ __metadata: languageName: node linkType: hard +"universalify@npm:^1.0.0": + version: 1.0.0 + resolution: "universalify@npm:1.0.0" + checksum: 095a808f2b915e3b89d29b6f3b4ee4163962b02fa5b7cb686970b8d0439f4ca789bc43f319b7cbb1ce552ae724e631d148e5aee9ce04c4f46a7fe0c5bbfd2b9e + languageName: node + linkType: hard + "universalify@npm:^2.0.0": version: 2.0.0 resolution: "universalify@npm:2.0.0" @@ -18588,6 +20111,17 @@ __metadata: languageName: node linkType: hard +"ursa-optional@npm:~0.10.0": + version: 0.10.2 + resolution: "ursa-optional@npm:0.10.2" + dependencies: + bindings: ^1.5.0 + nan: ^2.14.2 + node-gyp: latest + checksum: fd7b246352750fd5032e058ab14220e389bc08bd98d72e9d9f01ac443390435ac354735fb67739d57bb505bfdaeeb2359cd7b8c5d57abc9b82b16455d1be09a3 + languageName: node + linkType: hard + "use@npm:^3.1.0": version: 3.1.1 resolution: "use@npm:3.1.1" @@ -18683,7 +20217,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^3.3.2": +"uuid@npm:^3.2.1, uuid@npm:^3.3.2": version: 3.4.0 resolution: "uuid@npm:3.4.0" bin: @@ -18725,7 +20259,7 @@ __metadata: languageName: node linkType: hard -"varint@npm:^5.0.0": +"varint@npm:^5.0.0, varint@npm:~5.0.0": version: 5.0.2 resolution: "varint@npm:5.0.2" checksum: e1a66bf9a6cea96d1f13259170d4d41b845833acf3a9df990ea1e760d279bd70d5b1f4c002a50197efd2168a2fd43eb0b808444600fd4d23651e8d42fe90eb05 @@ -18829,6 +20363,15 @@ __metadata: languageName: node linkType: hard +"wcwidth@npm:^1.0.1": + version: 1.0.1 + resolution: "wcwidth@npm:1.0.1" + dependencies: + defaults: ^1.0.3 + checksum: 814e9d1ddcc9798f7377ffa448a5a3892232b9275ebb30a41b529607691c0491de47cba426e917a4d08ded3ee7e9ba2f3fe32e62ee3cd9c7d3bafb7754bd553c + languageName: node + linkType: hard + "weak-lru-cache@npm:^1.2.2": version: 1.2.2 resolution: "weak-lru-cache@npm:1.2.2" @@ -19059,6 +20602,16 @@ __metadata: languageName: node linkType: hard +"web3-eth-abi@npm:1.7.0": + version: 1.7.0 + resolution: "web3-eth-abi@npm:1.7.0" + dependencies: + "@ethersproject/abi": 5.0.7 + web3-utils: 1.7.0 + checksum: 1ff34dbf23844d90e7f669c28915fc709631948afe09dbcd00d061616db526899938d5c2704afd6c7c037d3822aeb9cdafb5a2ad3ad827e38fd22c45a21eace0 + languageName: node + linkType: hard + "web3-eth-accounts@npm:1.2.11": version: 1.2.11 resolution: "web3-eth-accounts@npm:1.2.11" @@ -19421,6 +20974,21 @@ __metadata: languageName: node linkType: hard +"web3-utils@npm:1.7.0": + version: 1.7.0 + resolution: "web3-utils@npm:1.7.0" + dependencies: + bn.js: ^4.11.9 + ethereum-bloom-filters: ^1.0.6 + ethereumjs-util: ^7.1.0 + ethjs-unit: 0.1.6 + number-to-bn: 1.7.0 + randombytes: ^2.1.0 + utf8: 3.0.0 + checksum: cd96c8cca5507714bf089eb91d513a3515b6e4a959b9d380ff543b2aa076379a4fb613a64c03a4d4332a8d7e78e5e22bb41ed0092ee634bbd336d12d80a73dc0 + languageName: node + linkType: hard + "web3-utils@npm:^1.0.0-beta.31, web3-utils@npm:^1.3.0": version: 1.7.1 resolution: "web3-utils@npm:1.7.1" @@ -19614,7 +21182,7 @@ __metadata: languageName: node linkType: hard -"which@npm:2.0.2, which@npm:^2.0.1, which@npm:^2.0.2": +"which@npm:2.0.2, which@npm:^2.0.0, which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" dependencies: @@ -19666,6 +21234,13 @@ __metadata: languageName: node linkType: hard +"wordwrap@npm:~0.0.2": + version: 0.0.3 + resolution: "wordwrap@npm:0.0.3" + checksum: dfc2d3512e857ae4b3bc2e8d4e5d2c285c28a4b87cd1d81c977ce9a1a99152d355807e046851a3d61148f39d877fbb889352e07b65a9cbdd2256aa928e159026 + languageName: node + linkType: hard + "wordwrapjs@npm:^4.0.0": version: 4.0.1 resolution: "wordwrapjs@npm:4.0.1" @@ -19916,7 +21491,16 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^1.10.0, yaml@npm:^1.10.2": +"yaml@npm:1.9.2": + version: 1.9.2 + resolution: "yaml@npm:1.9.2" + dependencies: + "@babel/runtime": ^7.9.2 + checksum: 6c6f08eb60ecd023e09c63bab8b81247a6f933634b9de931f4d32b733e6092d9cafc5cdc028b2209a4fec69a44c7cba18265258f27dd7995db5c205b6a42b8c1 + languageName: node + linkType: hard + +"yaml@npm:^1.10.0, yaml@npm:^1.10.2, yaml@npm:^1.7.2": version: 1.10.2 resolution: "yaml@npm:1.10.2" checksum: ce4ada136e8a78a0b08dc10b4b900936912d15de59905b2bf415b4d33c63df1d555d23acb2a41b23cf9fb5da41c256441afca3d6509de7247daa062fd2c5ea5f @@ -19940,6 +21524,16 @@ __metadata: languageName: node linkType: hard +"yargs-parser@npm:^16.1.0": + version: 16.1.0 + resolution: "yargs-parser@npm:16.1.0" + dependencies: + camelcase: ^5.0.0 + decamelize: ^1.2.0 + checksum: 29d1e380e24616c67b8897c9fc2159b24418b42b6d8f91535cd504f02ba14e49d75dcd45258936f0fda58c449f441362c5bcc22f0f19cbf3a512cc4f346309fe + languageName: node + linkType: hard + "yargs-parser@npm:^2.4.1": version: 2.4.1 resolution: "yargs-parser@npm:2.4.1" From f0d34a322798e8dc2498c856af5713baf6a38395 Mon Sep 17 00:00:00 2001 From: alcercu Date: Tue, 22 Mar 2022 17:26:46 +0100 Subject: [PATCH 02/14] feat(subgraph): add KlerosCore subgraph --- .gitignore | 4 + subgraph/.eslintrc.json | 10 + subgraph/.prettierrc | 3 + .../abis/{Kleroscore.json => KlerosCore.json} | 0 subgraph/generated/Kleroscore/Kleroscore.ts | 1731 ----------------- subgraph/generated/schema.ts | 75 - subgraph/package.json | 2 +- subgraph/schema.graphql | 79 +- subgraph/src/mapping.ts | 198 +- subgraph/subgraph.yaml | 11 +- yarn.lock | 10 +- 11 files changed, 227 insertions(+), 1896 deletions(-) create mode 100644 subgraph/.eslintrc.json create mode 100644 subgraph/.prettierrc rename subgraph/abis/{Kleroscore.json => KlerosCore.json} (100%) delete mode 100644 subgraph/generated/Kleroscore/Kleroscore.ts delete mode 100644 subgraph/generated/schema.ts diff --git a/.gitignore b/.gitignore index ee1eb0dae..d50d497c4 100644 --- a/.gitignore +++ b/.gitignore @@ -193,3 +193,7 @@ tags # .pnp.* # End of https://www.toptal.com/developers/gitignore/api/vim,node,visualstudiocode,yarn + +# subgraph +subgraph/generated/* +subgraph/build/* diff --git a/subgraph/.eslintrc.json b/subgraph/.eslintrc.json new file mode 100644 index 000000000..8256ebd88 --- /dev/null +++ b/subgraph/.eslintrc.json @@ -0,0 +1,10 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "extends": [ + "plugin:@typescript-eslint/recommended", + "prettier", + "prettier/@typescript-eslint" + ] +} diff --git a/subgraph/.prettierrc b/subgraph/.prettierrc new file mode 100644 index 000000000..9d4892be8 --- /dev/null +++ b/subgraph/.prettierrc @@ -0,0 +1,3 @@ +{ + "printWidth": 80 +} diff --git a/subgraph/abis/Kleroscore.json b/subgraph/abis/KlerosCore.json similarity index 100% rename from subgraph/abis/Kleroscore.json rename to subgraph/abis/KlerosCore.json diff --git a/subgraph/generated/Kleroscore/Kleroscore.ts b/subgraph/generated/Kleroscore/Kleroscore.ts deleted file mode 100644 index e59a970cc..000000000 --- a/subgraph/generated/Kleroscore/Kleroscore.ts +++ /dev/null @@ -1,1731 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt -} from "@graphprotocol/graph-ts"; - -export class AppealDecision extends ethereum.Event { - get params(): AppealDecision__Params { - return new AppealDecision__Params(this); - } -} - -export class AppealDecision__Params { - _event: AppealDecision; - - constructor(event: AppealDecision) { - this._event = event; - } - - get _disputeID(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get _arbitrable(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class AppealPossible extends ethereum.Event { - get params(): AppealPossible__Params { - return new AppealPossible__Params(this); - } -} - -export class AppealPossible__Params { - _event: AppealPossible; - - constructor(event: AppealPossible) { - this._event = event; - } - - get _disputeID(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get _arbitrable(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class DisputeCreation extends ethereum.Event { - get params(): DisputeCreation__Params { - return new DisputeCreation__Params(this); - } -} - -export class DisputeCreation__Params { - _event: DisputeCreation; - - constructor(event: DisputeCreation) { - this._event = event; - } - - get _disputeID(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get _arbitrable(): Address { - return this._event.parameters[1].value.toAddress(); - } -} - -export class Draw extends ethereum.Event { - get params(): Draw__Params { - return new Draw__Params(this); - } -} - -export class Draw__Params { - _event: Draw; - - constructor(event: Draw) { - this._event = event; - } - - get _address(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get _disputeID(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get _appeal(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get _voteID(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class NewPeriod extends ethereum.Event { - get params(): NewPeriod__Params { - return new NewPeriod__Params(this); - } -} - -export class NewPeriod__Params { - _event: NewPeriod; - - constructor(event: NewPeriod) { - this._event = event; - } - - get _disputeID(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get _period(): i32 { - return this._event.parameters[1].value.toI32(); - } -} - -export class StakeSet extends ethereum.Event { - get params(): StakeSet__Params { - return new StakeSet__Params(this); - } -} - -export class StakeSet__Params { - _event: StakeSet; - - constructor(event: StakeSet) { - this._event = event; - } - - get _address(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get _subcourtID(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get _amount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get _newTotalStake(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class TokenAndETHShift extends ethereum.Event { - get params(): TokenAndETHShift__Params { - return new TokenAndETHShift__Params(this); - } -} - -export class TokenAndETHShift__Params { - _event: TokenAndETHShift; - - constructor(event: TokenAndETHShift) { - this._event = event; - } - - get _account(): Address { - return this._event.parameters[0].value.toAddress(); - } - - get _disputeID(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get _tokenAmount(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } - - get _ETHAmount(): BigInt { - return this._event.parameters[3].value.toBigInt(); - } -} - -export class Kleroscore__appealPeriodResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class Kleroscore__courtsResult { - value0: BigInt; - value1: boolean; - value2: BigInt; - value3: BigInt; - value4: BigInt; - value5: BigInt; - value6: BigInt; - - constructor( - value0: BigInt, - value1: boolean, - value2: BigInt, - value3: BigInt, - value4: BigInt, - value5: BigInt, - value6: BigInt - ) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - this.value3 = value3; - this.value4 = value4; - this.value5 = value5; - this.value6 = value6; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromBoolean(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - map.set("value3", ethereum.Value.fromUnsignedBigInt(this.value3)); - map.set("value4", ethereum.Value.fromUnsignedBigInt(this.value4)); - map.set("value5", ethereum.Value.fromUnsignedBigInt(this.value5)); - map.set("value6", ethereum.Value.fromUnsignedBigInt(this.value6)); - return map; - } -} - -export class Kleroscore__disputesResult { - value0: BigInt; - value1: Address; - value2: Address; - value3: i32; - value4: boolean; - value5: BigInt; - value6: BigInt; - - constructor( - value0: BigInt, - value1: Address, - value2: Address, - value3: i32, - value4: boolean, - value5: BigInt, - value6: BigInt - ) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - this.value3 = value3; - this.value4 = value4; - this.value5 = value5; - this.value6 = value6; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromAddress(this.value1)); - map.set("value2", ethereum.Value.fromAddress(this.value2)); - map.set( - "value3", - ethereum.Value.fromUnsignedBigInt(BigInt.fromI32(this.value3)) - ); - map.set("value4", ethereum.Value.fromBoolean(this.value4)); - map.set("value5", ethereum.Value.fromUnsignedBigInt(this.value5)); - map.set("value6", ethereum.Value.fromUnsignedBigInt(this.value6)); - return map; - } -} - -export class Kleroscore__getJurorBalanceResult { - value0: BigInt; - value1: BigInt; - - constructor(value0: BigInt, value1: BigInt) { - this.value0 = value0; - this.value1 = value1; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - return map; - } -} - -export class Kleroscore__getRoundInfoResult { - value0: BigInt; - value1: BigInt; - value2: BigInt; - value3: BigInt; - value4: Array
; - - constructor( - value0: BigInt, - value1: BigInt, - value2: BigInt, - value3: BigInt, - value4: Array
- ) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - this.value3 = value3; - this.value4 = value4; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2)); - map.set("value3", ethereum.Value.fromUnsignedBigInt(this.value3)); - map.set("value4", ethereum.Value.fromAddressArray(this.value4)); - return map; - } -} - -export class Kleroscore__getSortitionSumTreeResult { - value0: BigInt; - value1: Array; - value2: Array; - - constructor(value0: BigInt, value1: Array, value2: Array) { - this.value0 = value0; - this.value1 = value1; - this.value2 = value2; - } - - toMap(): TypedMap { - let map = new TypedMap(); - map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0)); - map.set("value1", ethereum.Value.fromUnsignedBigIntArray(this.value1)); - map.set("value2", ethereum.Value.fromUnsignedBigIntArray(this.value2)); - return map; - } -} - -export class Kleroscore extends ethereum.SmartContract { - static bind(address: Address): Kleroscore { - return new Kleroscore("Kleroscore", address); - } - - ALPHA_DIVISOR(): BigInt { - let result = super.call("ALPHA_DIVISOR", "ALPHA_DIVISOR():(uint256)", []); - - return result[0].toBigInt(); - } - - try_ALPHA_DIVISOR(): ethereum.CallResult { - let result = super.tryCall( - "ALPHA_DIVISOR", - "ALPHA_DIVISOR():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - MAX_STAKE_PATHS(): BigInt { - let result = super.call( - "MAX_STAKE_PATHS", - "MAX_STAKE_PATHS():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_MAX_STAKE_PATHS(): ethereum.CallResult { - let result = super.tryCall( - "MAX_STAKE_PATHS", - "MAX_STAKE_PATHS():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - MIN_JURORS(): BigInt { - let result = super.call("MIN_JURORS", "MIN_JURORS():(uint256)", []); - - return result[0].toBigInt(); - } - - try_MIN_JURORS(): ethereum.CallResult { - let result = super.tryCall("MIN_JURORS", "MIN_JURORS():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - NON_PAYABLE_AMOUNT(): BigInt { - let result = super.call( - "NON_PAYABLE_AMOUNT", - "NON_PAYABLE_AMOUNT():(uint256)", - [] - ); - - return result[0].toBigInt(); - } - - try_NON_PAYABLE_AMOUNT(): ethereum.CallResult { - let result = super.tryCall( - "NON_PAYABLE_AMOUNT", - "NON_PAYABLE_AMOUNT():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - appealCost(_disputeID: BigInt): BigInt { - let result = super.call("appealCost", "appealCost(uint256):(uint256)", [ - ethereum.Value.fromUnsignedBigInt(_disputeID) - ]); - - return result[0].toBigInt(); - } - - try_appealCost(_disputeID: BigInt): ethereum.CallResult { - let result = super.tryCall("appealCost", "appealCost(uint256):(uint256)", [ - ethereum.Value.fromUnsignedBigInt(_disputeID) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - appealPeriod(_disputeID: BigInt): Kleroscore__appealPeriodResult { - let result = super.call( - "appealPeriod", - "appealPeriod(uint256):(uint256,uint256)", - [ethereum.Value.fromUnsignedBigInt(_disputeID)] - ); - - return new Kleroscore__appealPeriodResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_appealPeriod( - _disputeID: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "appealPeriod", - "appealPeriod(uint256):(uint256,uint256)", - [ethereum.Value.fromUnsignedBigInt(_disputeID)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Kleroscore__appealPeriodResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - arbitrationCost(_extraData: Bytes): BigInt { - let result = super.call( - "arbitrationCost", - "arbitrationCost(bytes):(uint256)", - [ethereum.Value.fromBytes(_extraData)] - ); - - return result[0].toBigInt(); - } - - try_arbitrationCost(_extraData: Bytes): ethereum.CallResult { - let result = super.tryCall( - "arbitrationCost", - "arbitrationCost(bytes):(uint256)", - [ethereum.Value.fromBytes(_extraData)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - areVotesHidden(_subcourtID: BigInt): boolean { - let result = super.call( - "areVotesHidden", - "areVotesHidden(uint256):(bool)", - [ethereum.Value.fromUnsignedBigInt(_subcourtID)] - ); - - return result[0].toBoolean(); - } - - try_areVotesHidden(_subcourtID: BigInt): ethereum.CallResult { - let result = super.tryCall( - "areVotesHidden", - "areVotesHidden(uint256):(bool)", - [ethereum.Value.fromUnsignedBigInt(_subcourtID)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - courts(param0: BigInt): Kleroscore__courtsResult { - let result = super.call( - "courts", - "courts(uint256):(uint96,bool,uint256,uint256,uint256,uint256,uint256)", - [ethereum.Value.fromUnsignedBigInt(param0)] - ); - - return new Kleroscore__courtsResult( - result[0].toBigInt(), - result[1].toBoolean(), - result[2].toBigInt(), - result[3].toBigInt(), - result[4].toBigInt(), - result[5].toBigInt(), - result[6].toBigInt() - ); - } - - try_courts(param0: BigInt): ethereum.CallResult { - let result = super.tryCall( - "courts", - "courts(uint256):(uint96,bool,uint256,uint256,uint256,uint256,uint256)", - [ethereum.Value.fromUnsignedBigInt(param0)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Kleroscore__courtsResult( - value[0].toBigInt(), - value[1].toBoolean(), - value[2].toBigInt(), - value[3].toBigInt(), - value[4].toBigInt(), - value[5].toBigInt(), - value[6].toBigInt() - ) - ); - } - - currentRuling(_disputeID: BigInt): BigInt { - let result = super.call( - "currentRuling", - "currentRuling(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(_disputeID)] - ); - - return result[0].toBigInt(); - } - - try_currentRuling(_disputeID: BigInt): ethereum.CallResult { - let result = super.tryCall( - "currentRuling", - "currentRuling(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(_disputeID)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - disputeKits(param0: BigInt): Address { - let result = super.call("disputeKits", "disputeKits(uint256):(address)", [ - ethereum.Value.fromUnsignedBigInt(param0) - ]); - - return result[0].toAddress(); - } - - try_disputeKits(param0: BigInt): ethereum.CallResult
{ - let result = super.tryCall( - "disputeKits", - "disputeKits(uint256):(address)", - [ethereum.Value.fromUnsignedBigInt(param0)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - disputes(param0: BigInt): Kleroscore__disputesResult { - let result = super.call( - "disputes", - "disputes(uint256):(uint96,address,address,uint8,bool,uint256,uint256)", - [ethereum.Value.fromUnsignedBigInt(param0)] - ); - - return new Kleroscore__disputesResult( - result[0].toBigInt(), - result[1].toAddress(), - result[2].toAddress(), - result[3].toI32(), - result[4].toBoolean(), - result[5].toBigInt(), - result[6].toBigInt() - ); - } - - try_disputes( - param0: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "disputes", - "disputes(uint256):(uint96,address,address,uint8,bool,uint256,uint256)", - [ethereum.Value.fromUnsignedBigInt(param0)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Kleroscore__disputesResult( - value[0].toBigInt(), - value[1].toAddress(), - value[2].toAddress(), - value[3].toI32(), - value[4].toBoolean(), - value[5].toBigInt(), - value[6].toBigInt() - ) - ); - } - - getCurrentPeriod(_disputeID: BigInt): i32 { - let result = super.call( - "getCurrentPeriod", - "getCurrentPeriod(uint256):(uint8)", - [ethereum.Value.fromUnsignedBigInt(_disputeID)] - ); - - return result[0].toI32(); - } - - try_getCurrentPeriod(_disputeID: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getCurrentPeriod", - "getCurrentPeriod(uint256):(uint8)", - [ethereum.Value.fromUnsignedBigInt(_disputeID)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toI32()); - } - - getJurorBalance( - _juror: Address, - _subcourtID: BigInt - ): Kleroscore__getJurorBalanceResult { - let result = super.call( - "getJurorBalance", - "getJurorBalance(address,uint96):(uint256,uint256)", - [ - ethereum.Value.fromAddress(_juror), - ethereum.Value.fromUnsignedBigInt(_subcourtID) - ] - ); - - return new Kleroscore__getJurorBalanceResult( - result[0].toBigInt(), - result[1].toBigInt() - ); - } - - try_getJurorBalance( - _juror: Address, - _subcourtID: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getJurorBalance", - "getJurorBalance(address,uint96):(uint256,uint256)", - [ - ethereum.Value.fromAddress(_juror), - ethereum.Value.fromUnsignedBigInt(_subcourtID) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Kleroscore__getJurorBalanceResult( - value[0].toBigInt(), - value[1].toBigInt() - ) - ); - } - - getNumberOfRounds(_disputeID: BigInt): BigInt { - let result = super.call( - "getNumberOfRounds", - "getNumberOfRounds(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(_disputeID)] - ); - - return result[0].toBigInt(); - } - - try_getNumberOfRounds(_disputeID: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getNumberOfRounds", - "getNumberOfRounds(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(_disputeID)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getRoundInfo( - _disputeID: BigInt, - _round: BigInt - ): Kleroscore__getRoundInfoResult { - let result = super.call( - "getRoundInfo", - "getRoundInfo(uint256,uint256):(uint256,uint256,uint256,uint256,address[])", - [ - ethereum.Value.fromUnsignedBigInt(_disputeID), - ethereum.Value.fromUnsignedBigInt(_round) - ] - ); - - return new Kleroscore__getRoundInfoResult( - result[0].toBigInt(), - result[1].toBigInt(), - result[2].toBigInt(), - result[3].toBigInt(), - result[4].toAddressArray() - ); - } - - try_getRoundInfo( - _disputeID: BigInt, - _round: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getRoundInfo", - "getRoundInfo(uint256,uint256):(uint256,uint256,uint256,uint256,address[])", - [ - ethereum.Value.fromUnsignedBigInt(_disputeID), - ethereum.Value.fromUnsignedBigInt(_round) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Kleroscore__getRoundInfoResult( - value[0].toBigInt(), - value[1].toBigInt(), - value[2].toBigInt(), - value[3].toBigInt(), - value[4].toAddressArray() - ) - ); - } - - getSortitionSumTree(_key: Bytes): Kleroscore__getSortitionSumTreeResult { - let result = super.call( - "getSortitionSumTree", - "getSortitionSumTree(bytes32):(uint256,uint256[],uint256[])", - [ethereum.Value.fromFixedBytes(_key)] - ); - - return new Kleroscore__getSortitionSumTreeResult( - result[0].toBigInt(), - result[1].toBigIntArray(), - result[2].toBigIntArray() - ); - } - - try_getSortitionSumTree( - _key: Bytes - ): ethereum.CallResult { - let result = super.tryCall( - "getSortitionSumTree", - "getSortitionSumTree(bytes32):(uint256,uint256[],uint256[])", - [ethereum.Value.fromFixedBytes(_key)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue( - new Kleroscore__getSortitionSumTreeResult( - value[0].toBigInt(), - value[1].toBigIntArray(), - value[2].toBigIntArray() - ) - ); - } - - getSortitionSumTreeID(_key: Bytes, _nodeIndex: BigInt): Bytes { - let result = super.call( - "getSortitionSumTreeID", - "getSortitionSumTreeID(bytes32,uint256):(bytes32)", - [ - ethereum.Value.fromFixedBytes(_key), - ethereum.Value.fromUnsignedBigInt(_nodeIndex) - ] - ); - - return result[0].toBytes(); - } - - try_getSortitionSumTreeID( - _key: Bytes, - _nodeIndex: BigInt - ): ethereum.CallResult { - let result = super.tryCall( - "getSortitionSumTreeID", - "getSortitionSumTreeID(bytes32,uint256):(bytes32)", - [ - ethereum.Value.fromFixedBytes(_key), - ethereum.Value.fromUnsignedBigInt(_nodeIndex) - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - getSubcourtID(_disputeID: BigInt): BigInt { - let result = super.call( - "getSubcourtID", - "getSubcourtID(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(_disputeID)] - ); - - return result[0].toBigInt(); - } - - try_getSubcourtID(_disputeID: BigInt): ethereum.CallResult { - let result = super.tryCall( - "getSubcourtID", - "getSubcourtID(uint256):(uint256)", - [ethereum.Value.fromUnsignedBigInt(_disputeID)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - getTimesPerPeriod(_subcourtID: BigInt): Array { - let result = super.call( - "getTimesPerPeriod", - "getTimesPerPeriod(uint96):(uint256[4])", - [ethereum.Value.fromUnsignedBigInt(_subcourtID)] - ); - - return result[0].toBigIntArray(); - } - - try_getTimesPerPeriod( - _subcourtID: BigInt - ): ethereum.CallResult> { - let result = super.tryCall( - "getTimesPerPeriod", - "getTimesPerPeriod(uint96):(uint256[4])", - [ethereum.Value.fromUnsignedBigInt(_subcourtID)] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigIntArray()); - } - - governor(): Address { - let result = super.call("governor", "governor():(address)", []); - - return result[0].toAddress(); - } - - try_governor(): ethereum.CallResult
{ - let result = super.tryCall("governor", "governor():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - isRuled(_disputeID: BigInt): boolean { - let result = super.call("isRuled", "isRuled(uint256):(bool)", [ - ethereum.Value.fromUnsignedBigInt(_disputeID) - ]); - - return result[0].toBoolean(); - } - - try_isRuled(_disputeID: BigInt): ethereum.CallResult { - let result = super.tryCall("isRuled", "isRuled(uint256):(bool)", [ - ethereum.Value.fromUnsignedBigInt(_disputeID) - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBoolean()); - } - - jurorProsecutionModule(): Address { - let result = super.call( - "jurorProsecutionModule", - "jurorProsecutionModule():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_jurorProsecutionModule(): ethereum.CallResult
{ - let result = super.tryCall( - "jurorProsecutionModule", - "jurorProsecutionModule():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } - - pinakion(): Address { - let result = super.call("pinakion", "pinakion():(address)", []); - - return result[0].toAddress(); - } - - try_pinakion(): ethereum.CallResult
{ - let result = super.tryCall("pinakion", "pinakion():(address)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class ConstructorCall extends ethereum.Call { - get inputs(): ConstructorCall__Inputs { - return new ConstructorCall__Inputs(this); - } - - get outputs(): ConstructorCall__Outputs { - return new ConstructorCall__Outputs(this); - } -} - -export class ConstructorCall__Inputs { - _call: ConstructorCall; - - constructor(call: ConstructorCall) { - this._call = call; - } - - get _governor(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _pinakion(): Address { - return this._call.inputValues[1].value.toAddress(); - } - - get _jurorProsecutionModule(): Address { - return this._call.inputValues[2].value.toAddress(); - } - - get _disputeKit(): Address { - return this._call.inputValues[3].value.toAddress(); - } - - get _hiddenVotes(): boolean { - return this._call.inputValues[4].value.toBoolean(); - } - - get _minStake(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get _alpha(): BigInt { - return this._call.inputValues[6].value.toBigInt(); - } - - get _feeForJuror(): BigInt { - return this._call.inputValues[7].value.toBigInt(); - } - - get _jurorsForCourtJump(): BigInt { - return this._call.inputValues[8].value.toBigInt(); - } - - get _timesPerPeriod(): Array { - return this._call.inputValues[9].value.toBigIntArray(); - } - - get _sortitionSumTreeK(): BigInt { - return this._call.inputValues[10].value.toBigInt(); - } -} - -export class ConstructorCall__Outputs { - _call: ConstructorCall; - - constructor(call: ConstructorCall) { - this._call = call; - } -} - -export class AddNewDisputeKitCall extends ethereum.Call { - get inputs(): AddNewDisputeKitCall__Inputs { - return new AddNewDisputeKitCall__Inputs(this); - } - - get outputs(): AddNewDisputeKitCall__Outputs { - return new AddNewDisputeKitCall__Outputs(this); - } -} - -export class AddNewDisputeKitCall__Inputs { - _call: AddNewDisputeKitCall; - - constructor(call: AddNewDisputeKitCall) { - this._call = call; - } - - get _disputeKitAddress(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _disputeKitID(): i32 { - return this._call.inputValues[1].value.toI32(); - } -} - -export class AddNewDisputeKitCall__Outputs { - _call: AddNewDisputeKitCall; - - constructor(call: AddNewDisputeKitCall) { - this._call = call; - } -} - -export class AppealCall extends ethereum.Call { - get inputs(): AppealCall__Inputs { - return new AppealCall__Inputs(this); - } - - get outputs(): AppealCall__Outputs { - return new AppealCall__Outputs(this); - } -} - -export class AppealCall__Inputs { - _call: AppealCall; - - constructor(call: AppealCall) { - this._call = call; - } - - get _disputeID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class AppealCall__Outputs { - _call: AppealCall; - - constructor(call: AppealCall) { - this._call = call; - } -} - -export class ChangeGovernorCall extends ethereum.Call { - get inputs(): ChangeGovernorCall__Inputs { - return new ChangeGovernorCall__Inputs(this); - } - - get outputs(): ChangeGovernorCall__Outputs { - return new ChangeGovernorCall__Outputs(this); - } -} - -export class ChangeGovernorCall__Inputs { - _call: ChangeGovernorCall; - - constructor(call: ChangeGovernorCall) { - this._call = call; - } - - get _governor(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class ChangeGovernorCall__Outputs { - _call: ChangeGovernorCall; - - constructor(call: ChangeGovernorCall) { - this._call = call; - } -} - -export class ChangeJurorProsecutionModuleCall extends ethereum.Call { - get inputs(): ChangeJurorProsecutionModuleCall__Inputs { - return new ChangeJurorProsecutionModuleCall__Inputs(this); - } - - get outputs(): ChangeJurorProsecutionModuleCall__Outputs { - return new ChangeJurorProsecutionModuleCall__Outputs(this); - } -} - -export class ChangeJurorProsecutionModuleCall__Inputs { - _call: ChangeJurorProsecutionModuleCall; - - constructor(call: ChangeJurorProsecutionModuleCall) { - this._call = call; - } - - get _jurorProsecutionModule(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class ChangeJurorProsecutionModuleCall__Outputs { - _call: ChangeJurorProsecutionModuleCall; - - constructor(call: ChangeJurorProsecutionModuleCall) { - this._call = call; - } -} - -export class ChangePinakionCall extends ethereum.Call { - get inputs(): ChangePinakionCall__Inputs { - return new ChangePinakionCall__Inputs(this); - } - - get outputs(): ChangePinakionCall__Outputs { - return new ChangePinakionCall__Outputs(this); - } -} - -export class ChangePinakionCall__Inputs { - _call: ChangePinakionCall; - - constructor(call: ChangePinakionCall) { - this._call = call; - } - - get _pinakion(): Address { - return this._call.inputValues[0].value.toAddress(); - } -} - -export class ChangePinakionCall__Outputs { - _call: ChangePinakionCall; - - constructor(call: ChangePinakionCall) { - this._call = call; - } -} - -export class ChangeSubcourtAlphaCall extends ethereum.Call { - get inputs(): ChangeSubcourtAlphaCall__Inputs { - return new ChangeSubcourtAlphaCall__Inputs(this); - } - - get outputs(): ChangeSubcourtAlphaCall__Outputs { - return new ChangeSubcourtAlphaCall__Outputs(this); - } -} - -export class ChangeSubcourtAlphaCall__Inputs { - _call: ChangeSubcourtAlphaCall; - - constructor(call: ChangeSubcourtAlphaCall) { - this._call = call; - } - - get _subcourtID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _alpha(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ChangeSubcourtAlphaCall__Outputs { - _call: ChangeSubcourtAlphaCall; - - constructor(call: ChangeSubcourtAlphaCall) { - this._call = call; - } -} - -export class ChangeSubcourtJurorFeeCall extends ethereum.Call { - get inputs(): ChangeSubcourtJurorFeeCall__Inputs { - return new ChangeSubcourtJurorFeeCall__Inputs(this); - } - - get outputs(): ChangeSubcourtJurorFeeCall__Outputs { - return new ChangeSubcourtJurorFeeCall__Outputs(this); - } -} - -export class ChangeSubcourtJurorFeeCall__Inputs { - _call: ChangeSubcourtJurorFeeCall; - - constructor(call: ChangeSubcourtJurorFeeCall) { - this._call = call; - } - - get _subcourtID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _feeForJuror(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ChangeSubcourtJurorFeeCall__Outputs { - _call: ChangeSubcourtJurorFeeCall; - - constructor(call: ChangeSubcourtJurorFeeCall) { - this._call = call; - } -} - -export class ChangeSubcourtJurorsForJumpCall extends ethereum.Call { - get inputs(): ChangeSubcourtJurorsForJumpCall__Inputs { - return new ChangeSubcourtJurorsForJumpCall__Inputs(this); - } - - get outputs(): ChangeSubcourtJurorsForJumpCall__Outputs { - return new ChangeSubcourtJurorsForJumpCall__Outputs(this); - } -} - -export class ChangeSubcourtJurorsForJumpCall__Inputs { - _call: ChangeSubcourtJurorsForJumpCall; - - constructor(call: ChangeSubcourtJurorsForJumpCall) { - this._call = call; - } - - get _subcourtID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _jurorsForCourtJump(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ChangeSubcourtJurorsForJumpCall__Outputs { - _call: ChangeSubcourtJurorsForJumpCall; - - constructor(call: ChangeSubcourtJurorsForJumpCall) { - this._call = call; - } -} - -export class ChangeSubcourtMinStakeCall extends ethereum.Call { - get inputs(): ChangeSubcourtMinStakeCall__Inputs { - return new ChangeSubcourtMinStakeCall__Inputs(this); - } - - get outputs(): ChangeSubcourtMinStakeCall__Outputs { - return new ChangeSubcourtMinStakeCall__Outputs(this); - } -} - -export class ChangeSubcourtMinStakeCall__Inputs { - _call: ChangeSubcourtMinStakeCall; - - constructor(call: ChangeSubcourtMinStakeCall) { - this._call = call; - } - - get _subcourtID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _minStake(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class ChangeSubcourtMinStakeCall__Outputs { - _call: ChangeSubcourtMinStakeCall; - - constructor(call: ChangeSubcourtMinStakeCall) { - this._call = call; - } -} - -export class ChangeSubcourtTimesPerPeriodCall extends ethereum.Call { - get inputs(): ChangeSubcourtTimesPerPeriodCall__Inputs { - return new ChangeSubcourtTimesPerPeriodCall__Inputs(this); - } - - get outputs(): ChangeSubcourtTimesPerPeriodCall__Outputs { - return new ChangeSubcourtTimesPerPeriodCall__Outputs(this); - } -} - -export class ChangeSubcourtTimesPerPeriodCall__Inputs { - _call: ChangeSubcourtTimesPerPeriodCall; - - constructor(call: ChangeSubcourtTimesPerPeriodCall) { - this._call = call; - } - - get _subcourtID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _timesPerPeriod(): Array { - return this._call.inputValues[1].value.toBigIntArray(); - } -} - -export class ChangeSubcourtTimesPerPeriodCall__Outputs { - _call: ChangeSubcourtTimesPerPeriodCall; - - constructor(call: ChangeSubcourtTimesPerPeriodCall) { - this._call = call; - } -} - -export class CreateDisputeCall extends ethereum.Call { - get inputs(): CreateDisputeCall__Inputs { - return new CreateDisputeCall__Inputs(this); - } - - get outputs(): CreateDisputeCall__Outputs { - return new CreateDisputeCall__Outputs(this); - } -} - -export class CreateDisputeCall__Inputs { - _call: CreateDisputeCall; - - constructor(call: CreateDisputeCall) { - this._call = call; - } - - get _numberOfChoices(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _extraData(): Bytes { - return this._call.inputValues[1].value.toBytes(); - } -} - -export class CreateDisputeCall__Outputs { - _call: CreateDisputeCall; - - constructor(call: CreateDisputeCall) { - this._call = call; - } - - get disputeID(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class CreateSubcourtCall extends ethereum.Call { - get inputs(): CreateSubcourtCall__Inputs { - return new CreateSubcourtCall__Inputs(this); - } - - get outputs(): CreateSubcourtCall__Outputs { - return new CreateSubcourtCall__Outputs(this); - } -} - -export class CreateSubcourtCall__Inputs { - _call: CreateSubcourtCall; - - constructor(call: CreateSubcourtCall) { - this._call = call; - } - - get _parent(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _hiddenVotes(): boolean { - return this._call.inputValues[1].value.toBoolean(); - } - - get _minStake(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } - - get _alpha(): BigInt { - return this._call.inputValues[3].value.toBigInt(); - } - - get _feeForJuror(): BigInt { - return this._call.inputValues[4].value.toBigInt(); - } - - get _jurorsForCourtJump(): BigInt { - return this._call.inputValues[5].value.toBigInt(); - } - - get _timesPerPeriod(): Array { - return this._call.inputValues[6].value.toBigIntArray(); - } - - get _sortitionSumTreeK(): BigInt { - return this._call.inputValues[7].value.toBigInt(); - } - - get _supportedDisputeKits(): BigInt { - return this._call.inputValues[8].value.toBigInt(); - } -} - -export class CreateSubcourtCall__Outputs { - _call: CreateSubcourtCall; - - constructor(call: CreateSubcourtCall) { - this._call = call; - } -} - -export class DrawCall extends ethereum.Call { - get inputs(): DrawCall__Inputs { - return new DrawCall__Inputs(this); - } - - get outputs(): DrawCall__Outputs { - return new DrawCall__Outputs(this); - } -} - -export class DrawCall__Inputs { - _call: DrawCall; - - constructor(call: DrawCall) { - this._call = call; - } - - get _disputeID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _iterations(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class DrawCall__Outputs { - _call: DrawCall; - - constructor(call: DrawCall) { - this._call = call; - } -} - -export class ExecuteCall extends ethereum.Call { - get inputs(): ExecuteCall__Inputs { - return new ExecuteCall__Inputs(this); - } - - get outputs(): ExecuteCall__Outputs { - return new ExecuteCall__Outputs(this); - } -} - -export class ExecuteCall__Inputs { - _call: ExecuteCall; - - constructor(call: ExecuteCall) { - this._call = call; - } - - get _disputeID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _appeal(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get _iterations(): BigInt { - return this._call.inputValues[2].value.toBigInt(); - } -} - -export class ExecuteCall__Outputs { - _call: ExecuteCall; - - constructor(call: ExecuteCall) { - this._call = call; - } -} - -export class ExecuteGovernorProposalCall extends ethereum.Call { - get inputs(): ExecuteGovernorProposalCall__Inputs { - return new ExecuteGovernorProposalCall__Inputs(this); - } - - get outputs(): ExecuteGovernorProposalCall__Outputs { - return new ExecuteGovernorProposalCall__Outputs(this); - } -} - -export class ExecuteGovernorProposalCall__Inputs { - _call: ExecuteGovernorProposalCall; - - constructor(call: ExecuteGovernorProposalCall) { - this._call = call; - } - - get _destination(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _amount(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } - - get _data(): Bytes { - return this._call.inputValues[2].value.toBytes(); - } -} - -export class ExecuteGovernorProposalCall__Outputs { - _call: ExecuteGovernorProposalCall; - - constructor(call: ExecuteGovernorProposalCall) { - this._call = call; - } -} - -export class ExecuteRulingCall extends ethereum.Call { - get inputs(): ExecuteRulingCall__Inputs { - return new ExecuteRulingCall__Inputs(this); - } - - get outputs(): ExecuteRulingCall__Outputs { - return new ExecuteRulingCall__Outputs(this); - } -} - -export class ExecuteRulingCall__Inputs { - _call: ExecuteRulingCall; - - constructor(call: ExecuteRulingCall) { - this._call = call; - } - - get _disputeID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class ExecuteRulingCall__Outputs { - _call: ExecuteRulingCall; - - constructor(call: ExecuteRulingCall) { - this._call = call; - } -} - -export class PassPeriodCall extends ethereum.Call { - get inputs(): PassPeriodCall__Inputs { - return new PassPeriodCall__Inputs(this); - } - - get outputs(): PassPeriodCall__Outputs { - return new PassPeriodCall__Outputs(this); - } -} - -export class PassPeriodCall__Inputs { - _call: PassPeriodCall; - - constructor(call: PassPeriodCall) { - this._call = call; - } - - get _disputeID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } -} - -export class PassPeriodCall__Outputs { - _call: PassPeriodCall; - - constructor(call: PassPeriodCall) { - this._call = call; - } -} - -export class SetDisputeKitsCall extends ethereum.Call { - get inputs(): SetDisputeKitsCall__Inputs { - return new SetDisputeKitsCall__Inputs(this); - } - - get outputs(): SetDisputeKitsCall__Outputs { - return new SetDisputeKitsCall__Outputs(this); - } -} - -export class SetDisputeKitsCall__Inputs { - _call: SetDisputeKitsCall; - - constructor(call: SetDisputeKitsCall) { - this._call = call; - } - - get _subcourtID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _disputeKitIDs(): Array { - return this._call.inputValues[1].value.toI32Array(); - } - - get _enable(): boolean { - return this._call.inputValues[2].value.toBoolean(); - } -} - -export class SetDisputeKitsCall__Outputs { - _call: SetDisputeKitsCall; - - constructor(call: SetDisputeKitsCall) { - this._call = call; - } -} - -export class SetStakeCall extends ethereum.Call { - get inputs(): SetStakeCall__Inputs { - return new SetStakeCall__Inputs(this); - } - - get outputs(): SetStakeCall__Outputs { - return new SetStakeCall__Outputs(this); - } -} - -export class SetStakeCall__Inputs { - _call: SetStakeCall; - - constructor(call: SetStakeCall) { - this._call = call; - } - - get _subcourtID(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _stake(): BigInt { - return this._call.inputValues[1].value.toBigInt(); - } -} - -export class SetStakeCall__Outputs { - _call: SetStakeCall; - - constructor(call: SetStakeCall) { - this._call = call; - } -} diff --git a/subgraph/generated/schema.ts b/subgraph/generated/schema.ts deleted file mode 100644 index 149762c3f..000000000 --- a/subgraph/generated/schema.ts +++ /dev/null @@ -1,75 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - TypedMap, - Entity, - Value, - ValueKind, - store, - Bytes, - BigInt, - BigDecimal -} from "@graphprotocol/graph-ts"; - -export class ExampleEntity extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - - this.set("count", Value.fromBigInt(BigInt.zero())); - this.set("_disputeID", Value.fromBigInt(BigInt.zero())); - this.set("_arbitrable", Value.fromBytes(Bytes.empty())); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save ExampleEntity entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.STRING, - `Entities of type ExampleEntity must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("ExampleEntity", id.toString(), this); - } - } - - static load(id: string): ExampleEntity | null { - return changetype(store.get("ExampleEntity", id)); - } - - get id(): string { - let value = this.get("id"); - return value!.toString(); - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get count(): BigInt { - let value = this.get("count"); - return value!.toBigInt(); - } - - set count(value: BigInt) { - this.set("count", Value.fromBigInt(value)); - } - - get _disputeID(): BigInt { - let value = this.get("_disputeID"); - return value!.toBigInt(); - } - - set _disputeID(value: BigInt) { - this.set("_disputeID", Value.fromBigInt(value)); - } - - get _arbitrable(): Bytes { - let value = this.get("_arbitrable"); - return value!.toBytes(); - } - - set _arbitrable(value: Bytes) { - this.set("_arbitrable", Value.fromBytes(value)); - } -} diff --git a/subgraph/package.json b/subgraph/package.json index fe501bc1d..aea2f51bb 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -10,7 +10,7 @@ "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 KlerosCore" }, "dependencies": { - "@graphprotocol/graph-cli": "0.28.0", + "@graphprotocol/graph-cli": "^0.28.1", "@graphprotocol/graph-ts": "0.26.0" } } diff --git a/subgraph/schema.graphql b/subgraph/schema.graphql index 3fd4cf712..9be7f6a47 100644 --- a/subgraph/schema.graphql +++ b/subgraph/schema.graphql @@ -1,6 +1,77 @@ -type ExampleEntity @entity { +enum Period { + Evidence + Commit + Vote + Appeal + Execution +} + +type Court @entity { + id: ID! + hiddenVotes: Boolean! + children: [Court!]! + childrenIDs: [String!]! + minStake: BigInt! + alpha: BigInt! + feeForJuror: BigInt! + jurorsForCourtJump: BigInt! + timesPerPeriod: [BigInt!]! + supportedDisputeKits: BigInt! + disputes: [Dispute!]! @derivedFrom(field: "subcourtID") + stakedJurors: [JurorTokensPerSubcourt!]! @derivedFrom(field: "subcourt") + tokens: [JurorTokensPerSubcourt!]! @derivedFrom(field: "subcourt") +} + +type Juror @entity { + id: ID! # Set to address + tokens: [JurorTokensPerSubcourt!]! @derivedFrom(field: "juror") + shifts: [TokenAndETHShift!]! @derivedFrom(field: "juror") + draws: [Draw!]! @derivedFrom(field: "juror") +} + +type TokenAndETHShift @entity { + id: ID! # Set to `${juror.id}-${dispute.id}` + juror: Juror! + dispute: Dispute! + tokenAmount: BigInt! + ethAmount: BigInt! +} + +type JurorTokensPerSubcourt @entity { + id: ID! # Set to `${juror.id}-${court.id}` + juror: Juror! + subcourt: Court! + staked: BigInt! + locked: BigInt! +} + +type Round @entity { + id: ID! # Set to `${dispute.id}-${currentRound}` + dispute: Dispute! + tokensAtStakePerJuror: BigInt! + totalFeesForJurors: BigInt! + repartitions: BigInt! + penalties: BigInt! + draws: [Draw!]! @derivedFrom(field: "round") +} + +type Draw @entity { + id: ID! # Set to `${dispute.id}-${currentRound}-${voteID}` + round: Round! + juror: Juror! + voteID: BigInt! +} + +type Dispute @entity { id: ID! - count: BigInt! - _disputeID: BigInt! # uint256 - _arbitrable: Bytes! # address + subcourtID: Court! + arbitrated: Bytes! + disputeKit: Bytes! + period: Period! + ruled: Boolean! + lastPeriodChange: BigInt! + nbVotes: BigInt! + currentRound: Int! + rounds: [Round!]! @derivedFrom(field: "dispute") + shifts: [TokenAndETHShift!]! @derivedFrom(field: "dispute") } diff --git a/subgraph/src/mapping.ts b/subgraph/src/mapping.ts index c65771a02..a042ceef2 100644 --- a/subgraph/src/mapping.ts +++ b/subgraph/src/mapping.ts @@ -1,89 +1,139 @@ import { BigInt } from "@graphprotocol/graph-ts" import { - Kleroscore, + KlerosCore, AppealDecision, - AppealPossible, DisputeCreation, - Draw, + Draw as DrawEvent, NewPeriod, StakeSet, - TokenAndETHShift -} from "../generated/Kleroscore/Kleroscore" -import { ExampleEntity } from "../generated/schema" - -export function handleAppealDecision(event: AppealDecision): void { - // Entities can be loaded from the store using a string ID; this ID - // needs to be unique across all entities of the same type - let entity = ExampleEntity.load(event.transaction.from.toHex()) + TokenAndETHShift as TokenAndETHShiftEvent +} from "../generated/KlerosCore/KlerosCore" +import { + Juror, + TokenAndETHShift, + JurorTokensPerSubcourt, + Round, + Draw, + Dispute, +} from "../generated/schema" - // Entities only exist after they have been saved to the store; - // `null` checks allow to create entities on demand - if (!entity) { - entity = new ExampleEntity(event.transaction.from.toHex()) +function getPeriodName(index: number): string { + if (index === 0) + return "Evidence" + if (index === 1) + return "Commit" + if (index === 2) + return "Vote" + if (index === 3) + return "Appeal" + if (index === 4) + return "Execution" + return "None" +} - // Entity fields can be set using simple assignments - entity.count = BigInt.fromI32(0) +export function handleAppealDecision(event: AppealDecision): void { + const disputeID = event.params._disputeID; + const dispute = Dispute.load(disputeID.toString()); + if (dispute) { + const contract = KlerosCore.bind(event.address); + const newRoundIndex = dispute.currentRound + 1; + const round = new Round( + `${disputeID.toString()}-${newRoundIndex.toString()}` + ); + const roundInfo = contract.getRoundInfo( + disputeID, BigInt.fromI64(newRoundIndex) + ); + round.dispute = disputeID.toString(); + round.tokensAtStakePerJuror = roundInfo.value0; + round.totalFeesForJurors = roundInfo.value1; + round.repartitions = roundInfo.value2; + round.penalties = roundInfo.value3; + dispute.currentRound = newRoundIndex; + round.save(); + dispute.save(); } - - // BigInt and BigDecimal math are supported - entity.count = entity.count + BigInt.fromI32(1) - - // Entity fields can be set based on event parameters - entity._disputeID = event.params._disputeID - entity._arbitrable = event.params._arbitrable - - // Entities can be written to the store with `.save()` - entity.save() - - // Note: If a handler doesn't require existing field values, it is faster - // _not_ to load the entity from the store. Instead, create it fresh with - // `new Entity(...)`, set the fields that should be updated and save the - // entity back to the store. Fields that were not set or unset remain - // unchanged, allowing for partial updates to be applied. - - // It is also possible to access smart contracts from mappings. For - // example, the contract that has emitted the event can be connected to - // with: - // - // let contract = Contract.bind(event.address) - // - // The following functions can then be called on this contract to access - // state variables and other data: - // - // - contract.ALPHA_DIVISOR(...) - // - contract.MAX_STAKE_PATHS(...) - // - contract.MIN_JURORS(...) - // - contract.NON_PAYABLE_AMOUNT(...) - // - contract.appealCost(...) - // - contract.appealPeriod(...) - // - contract.arbitrationCost(...) - // - contract.areVotesHidden(...) - // - contract.courts(...) - // - contract.currentRuling(...) - // - contract.disputeKits(...) - // - contract.disputes(...) - // - contract.getCurrentPeriod(...) - // - contract.getJurorBalance(...) - // - contract.getNumberOfRounds(...) - // - contract.getRoundInfo(...) - // - contract.getSortitionSumTree(...) - // - contract.getSortitionSumTreeID(...) - // - contract.getSubcourtID(...) - // - contract.getTimesPerPeriod(...) - // - contract.governor(...) - // - contract.isRuled(...) - // - contract.jurorProsecutionModule(...) - // - contract.pinakion(...) } -export function handleAppealPossible(event: AppealPossible): void {} - -export function handleDisputeCreation(event: DisputeCreation): void {} +export function handleDisputeCreation(event: DisputeCreation): void { + const contract = KlerosCore.bind(event.address); + const disputeID = event.params._disputeID; + const dispute = new Dispute(disputeID.toString()); + const disputeStorage = contract.disputes(disputeID); + const subcourtID = disputeStorage.value0.toString(); + dispute.arbitrated = event.params._arbitrable; + dispute.subcourtID = subcourtID; + dispute.disputeKit = disputeStorage.value2; + dispute.period = "Evidence"; + dispute.ruled = false; + dispute.lastPeriodChange = disputeStorage.value5; + dispute.nbVotes = disputeStorage.value6; + dispute.currentRound = 0; + const roundInfo = contract.getRoundInfo(disputeID, BigInt.fromString("0")); + const round = new Round(`${disputeID.toString()}-0`); + round.dispute = disputeID.toString(); + round.tokensAtStakePerJuror = roundInfo.value0; + round.totalFeesForJurors = roundInfo.value1; + round.repartitions = roundInfo.value2; + round.penalties = roundInfo.value3; + dispute.save(); + round.save(); +} -export function handleDraw(event: Draw): void {} +export function handleNewPeriod(event: NewPeriod): void { + const disputeID = event.params._disputeID; + const dispute = Dispute.load(disputeID.toString()); + if (dispute) { + dispute.period = getPeriodName(event.params._period); + dispute.save(); + } +} -export function handleNewPeriod(event: NewPeriod): void {} +export function handleDraw(event: DrawEvent): void { + const disputeID = event.params._disputeID; + const currentRound = event.params._appeal; + const voteID = event.params._voteID; + const drawID = ( + `${disputeID.toString()}-${currentRound.toString()}-${voteID.toString()}` + ); + const drawnAddress = event.params._address; + const draw = new Draw(drawID); + draw.round = currentRound.toString(); + draw.juror = drawnAddress.toHexString(); + draw.voteID = voteID; + draw.save(); +} -export function handleStakeSet(event: StakeSet): void {} +export function handleStakeSet(event: StakeSet): void { + const jurorAddress = event.params._address.toHexString(); + let juror = Juror.load(jurorAddress); + if (!juror) { + juror = new Juror(jurorAddress); + } + juror.save(); + const subcourtID = event.params._subcourtID; + const amountStaked = event.params._newTotalStake; + const jurorTokensID = `${jurorAddress}-${subcourtID.toString()}`; + let jurorTokens = JurorTokensPerSubcourt.load(jurorTokensID); + if (!jurorTokens) { + jurorTokens = new JurorTokensPerSubcourt(jurorTokensID); + jurorTokens.juror = jurorAddress; + jurorTokens.subcourt = subcourtID.toString(); + jurorTokens.locked = BigInt.fromI32(0); + } + jurorTokens.staked = amountStaked; + jurorTokens.save(); +} -export function handleTokenAndETHShift(event: TokenAndETHShift): void {} +export function handleTokenAndETHShift(event: TokenAndETHShiftEvent): void { + const jurorAddress = event.params._account.toHexString(); + const disputeID = event.params._disputeID; + const shiftID = `${jurorAddress}-${disputeID.toString()}` + const tokenAmount = event.params._tokenAmount; + const ethAmount = event.params._ETHAmount; + const shift = new TokenAndETHShift(shiftID); + shift.juror = jurorAddress; + shift.dispute = disputeID.toString(); + shift.tokenAmount = tokenAmount; + shift.ethAmount = ethAmount; + shift.save(); +} diff --git a/subgraph/subgraph.yaml b/subgraph/subgraph.yaml index 42aca24d7..4d2d80c71 100644 --- a/subgraph/subgraph.yaml +++ b/subgraph/subgraph.yaml @@ -3,11 +3,12 @@ schema: file: ./schema.graphql dataSources: - kind: ethereum - name: Kleroscore + name: KlerosCore network: arbitrum-rinkeby source: address: "0xd08452AEE7ab5bE3BF6733BA0d3F0CFdaf060Aa2" - abi: Kleroscore + abi: KlerosCore + startBlock: 9609833 mapping: kind: ethereum/events apiVersion: 0.0.5 @@ -21,13 +22,11 @@ dataSources: - StakeSet - TokenAndETHShift abis: - - name: Kleroscore - file: ./abis/Kleroscore.json + - name: KlerosCore + file: ./abis/KlerosCore.json eventHandlers: - event: AppealDecision(indexed uint256,indexed address) handler: handleAppealDecision - - event: AppealPossible(indexed uint256,indexed address) - handler: handleAppealPossible - event: DisputeCreation(indexed uint256,indexed address) handler: handleDisputeCreation - event: Draw(indexed address,indexed uint256,uint256,uint256) diff --git a/yarn.lock b/yarn.lock index 4c89a2ae8..d3b64a09c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1563,9 +1563,9 @@ __metadata: languageName: node linkType: hard -"@graphprotocol/graph-cli@npm:0.28.0": - version: 0.28.0 - resolution: "@graphprotocol/graph-cli@npm:0.28.0" +"@graphprotocol/graph-cli@npm:^0.28.1": + version: 0.28.1 + resolution: "@graphprotocol/graph-cli@npm:0.28.1" dependencies: assemblyscript: 0.19.10 binary-install-raw: 0.0.13 @@ -1594,7 +1594,7 @@ __metadata: yaml: 1.9.2 bin: graph: bin/graph - checksum: 5d1e4ecd4f452fffcaf74fa2a31ed68744eb4a936611c82cdf56bd16a7f362c3d2146491880633a2d68c4e06e05514c845250bad4b8c337140d16d29ad45de63 + checksum: c2bc40cb06a6a9a2bfe301aae447f5d232a6babf98b7f740110acd783ee60d70257b02ff631812e6cc423c97ce9b6be1ad5a08e27dfe2ef93aa17aea368d4e60 languageName: node linkType: hard @@ -3787,7 +3787,7 @@ __metadata: version: 0.0.0-use.local resolution: "KlerosCore@workspace:subgraph" dependencies: - "@graphprotocol/graph-cli": 0.28.0 + "@graphprotocol/graph-cli": ^0.28.1 "@graphprotocol/graph-ts": 0.26.0 languageName: unknown linkType: soft From 21b5555707e87765137f62b10237ac777a91c844 Mon Sep 17 00:00:00 2001 From: alcercu Date: Fri, 25 Mar 2022 18:25:56 +0100 Subject: [PATCH 03/14] feat(subgraph): add HomeGateway and FastBridgeSender mappings --- subgraph/abis/FastBridgeSender.json | 239 +++++++++++++++ subgraph/abis/HomeGateway.json | 336 +++++++++++++++++++++ subgraph/schema.graphql | 17 ++ subgraph/src/FastBridgeSender.ts | 16 + subgraph/src/HomeGateway.ts | 21 ++ subgraph/src/{mapping.ts => KlerosCore.ts} | 0 subgraph/subgraph.yaml | 42 ++- 7 files changed, 670 insertions(+), 1 deletion(-) create mode 100644 subgraph/abis/FastBridgeSender.json create mode 100644 subgraph/abis/HomeGateway.json create mode 100644 subgraph/src/FastBridgeSender.ts create mode 100644 subgraph/src/HomeGateway.ts rename subgraph/src/{mapping.ts => KlerosCore.ts} (100%) diff --git a/subgraph/abis/FastBridgeSender.json b/subgraph/abis/FastBridgeSender.json new file mode 100644 index 000000000..ac27b4dc6 --- /dev/null +++ b/subgraph/abis/FastBridgeSender.json @@ -0,0 +1,239 @@ +{ + "address": "0x0b9e03455Fed83f209Fa7ce596c93ba6aBAd1f46", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ISafeBridge", + "name": "_safebridge", + "type": "address" + }, + { + "internalType": "contract IFastBridgeReceiver", + "name": "_fastBridgeReceiver", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "OutgoingMessage", + "type": "event" + }, + { + "inputs": [], + "name": "fastBridgeReceiver", + "outputs": [ + { + "internalType": "contract IFastBridgeReceiver", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fastSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "safebridge", + "outputs": [ + { + "internalType": "contract ISafeBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_receiver", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "sendFast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_receiver", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "sendSafe", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_fastSender", + "type": "address" + } + ], + "name": "setFastSender", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x8be78ae0b525d0fa74956c8fa9dfd82e73b37e0c742ebee0a8452cfa2e4d0bc8", + "receipt": { + "to": null, + "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", + "contractAddress": "0x0b9e03455Fed83f209Fa7ce596c93ba6aBAd1f46", + "transactionIndex": 0, + "gasUsed": "3163802", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1429a648bb019eca3b938c71d358c90d9eec53ce40e277623848fbcbd69fcad7", + "transactionHash": "0x8be78ae0b525d0fa74956c8fa9dfd82e73b37e0c742ebee0a8452cfa2e4d0bc8", + "logs": [], + "blockNumber": 9610369, + "cumulativeGasUsed": "122282", + "status": 1, + "byzantium": true + }, + "args": [ + "0x1406bC99873d16Cde3491F809f1Af9442cb5A338", + "0xD78DCddE2C5a2Bd4BB246Bc7dB6994b95f7c442C" + ], + "numDeployments": 1, + "solcInputHash": "0a1ec2a631b00a23a4a92b2eaceb36a5", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ISafeBridge\",\"name\":\"_safebridge\",\"type\":\"address\"},{\"internalType\":\"contract IFastBridgeReceiver\",\"name\":\"_fastBridgeReceiver\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"OutgoingMessage\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"fastBridgeReceiver\",\"outputs\":[{\"internalType\":\"contract IFastBridgeReceiver\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fastSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"safebridge\",\"outputs\":[{\"internalType\":\"contract ISafeBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"}],\"name\":\"sendFast\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"}],\"name\":\"sendSafe\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_fastSender\",\"type\":\"address\"}],\"name\":\"setFastSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"sendFast(address,bytes)\":{\"params\":{\"_calldata\":\"The receiving domain encoded message data.\",\"_receiver\":\"The L1 contract address who will receive the calldata\"}},\"sendSafe(address,bytes)\":{\"params\":{\"_calldata\":\"The receiving domain encoded message data.\",\"_receiver\":\"The L1 contract address who will receive the calldata\"}}},\"version\":1},\"userdoc\":{\"events\":{\"OutgoingMessage(address,bytes32,bytes)\":{\"notice\":\"The bridgers need to watch for these events and relay the messageHash on the FastBridgeReceiver.\"}},\"kind\":\"user\",\"methods\":{\"sendFast(address,bytes)\":{\"notice\":\"Sends an arbitrary message from one domain to another via the fast bridge mechanism\"},\"sendSafe(address,bytes)\":{\"notice\":\"Sends an arbitrary message from one domain to another via the safe bridge mechanism, which relies on the chain's native bridge. It is unnecessary during normal operations but essential only in case of challenge. It may require some ETH (or whichever native token) to pay for the bridging cost, depending on the underlying safe bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridge/FastBridgeSender.sol\":\"FastBridgeSender\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridge/FastBridgeSender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@shalzz]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./interfaces/ISafeBridge.sol\\\";\\nimport \\\"./interfaces/IFastBridgeSender.sol\\\";\\nimport \\\"./interfaces/IFastBridgeReceiver.sol\\\";\\n\\ncontract FastBridgeSender is IFastBridgeSender {\\n ISafeBridge public safebridge;\\n IFastBridgeReceiver public fastBridgeReceiver;\\n address public fastSender;\\n\\n /**\\n * The bridgers need to watch for these events and\\n * relay the messageHash on the FastBridgeReceiver.\\n */\\n event OutgoingMessage(address target, bytes32 messageHash, bytes message);\\n\\n constructor(ISafeBridge _safebridge, IFastBridgeReceiver _fastBridgeReceiver) {\\n safebridge = _safebridge;\\n fastBridgeReceiver = _fastBridgeReceiver;\\n }\\n\\n function setFastSender(address _fastSender) external {\\n require(fastSender == address(0));\\n fastSender = _fastSender;\\n }\\n\\n /**\\n * Sends an arbitrary message from one domain to another\\n * via the fast bridge mechanism\\n *\\n * @param _receiver The L1 contract address who will receive the calldata\\n * @param _calldata The receiving domain encoded message data.\\n */\\n function sendFast(address _receiver, bytes memory _calldata) external {\\n require(msg.sender == fastSender, \\\"Access not allowed: Fast Sender only.\\\");\\n\\n // Encode the receiver address with the function signature + arguments i.e calldata\\n bytes memory encodedData = abi.encode(_receiver, _calldata);\\n\\n emit OutgoingMessage(_receiver, keccak256(encodedData), encodedData);\\n }\\n\\n /**\\n * Sends an arbitrary message from one domain to another\\n * via the safe bridge mechanism, which relies on the chain's native bridge.\\n *\\n * It is unnecessary during normal operations but essential only in case of challenge.\\n *\\n * It may require some ETH (or whichever native token) to pay for the bridging cost,\\n * depending on the underlying safe bridge.\\n *\\n * @param _receiver The L1 contract address who will receive the calldata\\n * @param _calldata The receiving domain encoded message data.\\n */\\n function sendSafe(address _receiver, bytes memory _calldata) external payable {\\n // The safe bridge sends the encoded data to the FastBridgeReceiver\\n // in order for the FastBridgeReceiver to resolve any potential\\n // challenges and then forwards the message to the actual\\n // intended recipient encoded in `data`\\n // TODO: For this encodedData needs to be wrapped into an\\n // IFastBridgeReceiver function.\\n // TODO: add access checks for this on the FastBridgeReceiver.\\n // TODO: how much ETH should be provided for bridging? add an ISafeBridge.bridgingCost()\\n bytes memory encodedData = abi.encode(_receiver, _calldata);\\n safebridge.sendSafe{value: msg.value}(address(fastBridgeReceiver), encodedData);\\n }\\n}\\n\",\"keccak256\":\"0x38b58a84e65e83b015c2ff77333129656a759b803118870db9e2bc0a0453c3eb\",\"license\":\"MIT\"},\"src/bridge/interfaces/IFastBridgeReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\ninterface IFastBridgeReceiver {\\n function claim(bytes32 _messageHash) external payable;\\n\\n function verifyAndRelay(bytes32 _messageHash, bytes memory _calldata) external;\\n\\n function withdrawClaimDeposit(bytes32 _messageHash) external;\\n\\n function claimDeposit() external view returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x1d7f6a6ed2c2b88f51833cba6091c57a43af2915a265395ad11aad08b1f7285d\",\"license\":\"MIT\"},\"src/bridge/interfaces/IFastBridgeSender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\ninterface IFastBridgeSender {\\n /**\\n * Sends an arbitrary message from one domain to another\\n * via the fast bridge mechanism\\n *\\n * TODO: probably needs some access control either on the sender side\\n * or the receiver side\\n *\\n * @param _receiver The L1 contract address who will receive the calldata\\n * @param _calldata The receiving domain encoded message data.\\n */\\n function sendFast(address _receiver, bytes memory _calldata) external;\\n}\\n\",\"keccak256\":\"0xcbf3e9b5e153940b73ab5f09469eaf2fb24a1effac83c3786b27f785c325ff2e\",\"license\":\"MIT\"},\"src/bridge/interfaces/ISafeBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\ninterface ISafeBridge {\\n /**\\n * Sends an arbitrary message from one domain to another.\\n *\\n * @param _receiver The L1 contract address who will receive the calldata\\n * @param _calldata The L2 encoded message data.\\n * @return Unique id to track the message request/transaction.\\n */\\n function sendSafe(address _receiver, bytes memory _calldata) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2e7ab23dc7721f51f3d115ea3a06c590869e8671ed824987756ab4bb224845d1\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516105b23803806105b283398101604081905261002f91610078565b600080546001600160a01b039384166001600160a01b031991821617909155600180549290931691161790556100b2565b6001600160a01b038116811461007557600080fd5b50565b6000806040838503121561008b57600080fd5b825161009681610060565b60208401519092506100a781610060565b809150509250929050565b6104f1806100c16000396000f3fe6080604052600436106100555760003560e01c80630d85ec7e1461005a57806346c2cfee146100965780638f516b0d146100b857806398ec20ec146100d8578063be44ae1c146100f8578063d96a36ca1461010b575b600080fd5b34801561006657600080fd5b5060005461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b3480156100a257600080fd5b506100b66100b13660046102ff565b61012b565b005b3480156100c457600080fd5b5060025461007a906001600160a01b031681565b3480156100e457600080fd5b506100b66100f3366004610337565b610163565b6100b6610106366004610337565b61023c565b34801561011757600080fd5b5060015461007a906001600160a01b031681565b6002546001600160a01b03161561014157600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146101cf5760405162461bcd60e51b815260206004820152602560248201527f416363657373206e6f7420616c6c6f7765643a20466173742053656e6465722060448201526437b7363c9760d91b606482015260840160405180910390fd5b600082826040516020016101e4929190610446565b60405160208183030381529060405290507f885ffc934437efa035b94d89742209ddef30dac81f0aadbb92d520cd54dc2d398382805190602001208360405161022f93929190610472565b60405180910390a1505050565b60008282604051602001610251929190610446565b60408051601f1981840301815290829052600054600154632f912b8760e21b84529193506001600160a01b039081169263be44ae1c92349261029a929116908690600401610446565b60206040518083038185885af11580156102b8573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906102dd91906104a2565b50505050565b80356001600160a01b03811681146102fa57600080fd5b919050565b60006020828403121561031157600080fd5b61031a826102e3565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561034a57600080fd5b610353836102e3565b9150602083013567ffffffffffffffff8082111561037057600080fd5b818501915085601f83011261038457600080fd5b81358181111561039657610396610321565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610321565b816040528281528860208487010111156103d757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000815180845260005b8181101561041f57602081850181015186830182015201610403565b81811115610431576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061046a908301846103f9565b949350505050565b60018060a01b038416815282602082015260606040820152600061049960608301846103f9565b95945050505050565b6000602082840312156104b457600080fd5b505191905056fea264697066735822122027798849f47017ea415e2d49b22f4ac53ed207353ed98ef0272d1f23362730d864736f6c634300080a0033", + "deployedBytecode": "0x6080604052600436106100555760003560e01c80630d85ec7e1461005a57806346c2cfee146100965780638f516b0d146100b857806398ec20ec146100d8578063be44ae1c146100f8578063d96a36ca1461010b575b600080fd5b34801561006657600080fd5b5060005461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b3480156100a257600080fd5b506100b66100b13660046102ff565b61012b565b005b3480156100c457600080fd5b5060025461007a906001600160a01b031681565b3480156100e457600080fd5b506100b66100f3366004610337565b610163565b6100b6610106366004610337565b61023c565b34801561011757600080fd5b5060015461007a906001600160a01b031681565b6002546001600160a01b03161561014157600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146101cf5760405162461bcd60e51b815260206004820152602560248201527f416363657373206e6f7420616c6c6f7765643a20466173742053656e6465722060448201526437b7363c9760d91b606482015260840160405180910390fd5b600082826040516020016101e4929190610446565b60405160208183030381529060405290507f885ffc934437efa035b94d89742209ddef30dac81f0aadbb92d520cd54dc2d398382805190602001208360405161022f93929190610472565b60405180910390a1505050565b60008282604051602001610251929190610446565b60408051601f1981840301815290829052600054600154632f912b8760e21b84529193506001600160a01b039081169263be44ae1c92349261029a929116908690600401610446565b60206040518083038185885af11580156102b8573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906102dd91906104a2565b50505050565b80356001600160a01b03811681146102fa57600080fd5b919050565b60006020828403121561031157600080fd5b61031a826102e3565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561034a57600080fd5b610353836102e3565b9150602083013567ffffffffffffffff8082111561037057600080fd5b818501915085601f83011261038457600080fd5b81358181111561039657610396610321565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610321565b816040528281528860208487010111156103d757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000815180845260005b8181101561041f57602081850181015186830182015201610403565b81811115610431576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061046a908301846103f9565b949350505050565b60018060a01b038416815282602082015260606040820152600061049960608301846103f9565b95945050505050565b6000602082840312156104b457600080fd5b505191905056fea264697066735822122027798849f47017ea415e2d49b22f4ac53ed207353ed98ef0272d1f23362730d864736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": { + "sendFast(address,bytes)": { + "params": { + "_calldata": "The receiving domain encoded message data.", + "_receiver": "The L1 contract address who will receive the calldata" + } + }, + "sendSafe(address,bytes)": { + "params": { + "_calldata": "The receiving domain encoded message data.", + "_receiver": "The L1 contract address who will receive the calldata" + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "OutgoingMessage(address,bytes32,bytes)": { + "notice": "The bridgers need to watch for these events and relay the messageHash on the FastBridgeReceiver." + } + }, + "kind": "user", + "methods": { + "sendFast(address,bytes)": { + "notice": "Sends an arbitrary message from one domain to another via the fast bridge mechanism" + }, + "sendSafe(address,bytes)": { + "notice": "Sends an arbitrary message from one domain to another via the safe bridge mechanism, which relies on the chain's native bridge. It is unnecessary during normal operations but essential only in case of challenge. It may require some ETH (or whichever native token) to pay for the bridging cost, depending on the underlying safe bridge." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8249, + "contract": "src/bridge/FastBridgeSender.sol:FastBridgeSender", + "label": "safebridge", + "offset": 0, + "slot": "0", + "type": "t_contract(ISafeBridge)8507" + }, + { + "astId": 8252, + "contract": "src/bridge/FastBridgeSender.sol:FastBridgeSender", + "label": "fastBridgeReceiver", + "offset": 0, + "slot": "1", + "type": "t_contract(IFastBridgeReceiver)8483" + }, + { + "astId": 8254, + "contract": "src/bridge/FastBridgeSender.sol:FastBridgeSender", + "label": "fastSender", + "offset": 0, + "slot": "2", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(IFastBridgeReceiver)8483": { + "encoding": "inplace", + "label": "contract IFastBridgeReceiver", + "numberOfBytes": "20" + }, + "t_contract(ISafeBridge)8507": { + "encoding": "inplace", + "label": "contract ISafeBridge", + "numberOfBytes": "20" + } + } + } +} diff --git a/subgraph/abis/HomeGateway.json b/subgraph/abis/HomeGateway.json new file mode 100644 index 000000000..8025c7171 --- /dev/null +++ b/subgraph/abis/HomeGateway.json @@ -0,0 +1,336 @@ +[ + { + "inputs": [ + { + "internalType": "contract IArbitrator", + "name": "_arbitrator", + "type": "address" + }, + { + "internalType": "contract IFastBridgeSender", + "name": "_fastbridge", + "type": "address" + }, + { + "internalType": "address", + "name": "_foreignGateway", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_foreignChainID", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrator", + "name": "_arbitrator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_metaEvidenceID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_evidenceGroupID", + "type": "uint256" + } + ], + "name": "Dispute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrator", + "name": "_arbitrator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_evidenceGroupID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_party", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "_evidence", + "type": "string" + } + ], + "name": "Evidence", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_metaEvidenceID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "_evidence", + "type": "string" + } + ], + "name": "MetaEvidence", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrator", + "name": "_arbitrator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "Ruling", + "type": "event" + }, + { + "inputs": [], + "name": "arbitrator", + "outputs": [ + { + "internalType": "contract IArbitrator", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "chainID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_disputeHash", + "type": "bytes32" + } + ], + "name": "disputeHashToHomeID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "disputeHashtoID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "disputeHashtoRelayedData", + "outputs": [ + { + "internalType": "uint256", + "name": "arbitrationCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "relayer", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputeIDtoHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fastbridge", + "outputs": [ + { + "internalType": "contract IFastBridgeSender", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "foreignChainID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "foreignGateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_originalChainID", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_originalBlockHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_originalDisputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_choices", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_extraData", + "type": "bytes" + }, + { + "internalType": "address", + "name": "_arbitrable", + "type": "address" + } + ], + "name": "relayCreateDispute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "rule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraph/schema.graphql b/subgraph/schema.graphql index 9be7f6a47..9bc08a6ee 100644 --- a/subgraph/schema.graphql +++ b/subgraph/schema.graphql @@ -74,4 +74,21 @@ type Dispute @entity { currentRound: Int! rounds: [Round!]! @derivedFrom(field: "dispute") shifts: [TokenAndETHShift!]! @derivedFrom(field: "dispute") + gatewayDispute: GatewayDispute! @derivedFrom(field: "homeDispute") +} + +type GatewayDispute @entity { + id: ID! + homeDispute: Dispute! + arbitrator: Bytes! + disputeHash: Bytes! + arbitrationCost: BigInt! + relayer: Bytes! +} + +type OutgoingMessage @entity { + id: ID! # Set to messageHash + target: Bytes! + messageHash: String! + message: String! } diff --git a/subgraph/src/FastBridgeSender.ts b/subgraph/src/FastBridgeSender.ts new file mode 100644 index 000000000..2e351cb8f --- /dev/null +++ b/subgraph/src/FastBridgeSender.ts @@ -0,0 +1,16 @@ +import { + OutgoingMessage as OutgoingMessageEvent, +} from "../generated/FastBridgeSender/FastBridgeSender"; +import { + OutgoingMessage +} from "../generated/schema"; + +export function handleOutgoingMessage(event: OutgoingMessageEvent): void { + const outgoingMessage = new OutgoingMessage( + event.params.messageHash.toString() + ); + outgoingMessage.target = event.params.target; + outgoingMessage.messageHash = event.params.messageHash.toHex(); + outgoingMessage.message = event.params.message.toHex(); + outgoingMessage.save(); +} diff --git a/subgraph/src/HomeGateway.ts b/subgraph/src/HomeGateway.ts new file mode 100644 index 000000000..24f683529 --- /dev/null +++ b/subgraph/src/HomeGateway.ts @@ -0,0 +1,21 @@ +import { + HomeGateway, + Dispute as DisputeEvent, +} from "../generated/HomeGateway/HomeGateway"; +import { + GatewayDispute +} from "../generated/schema"; + +export function handleDisputeEvent(event: DisputeEvent): void { + const contract = HomeGateway.bind(event.address); + const disputeID = event.params._disputeID; + const dispute = new GatewayDispute(disputeID.toString()); + dispute.homeDispute = disputeID.toString(); + dispute.arbitrator = contract.arbitrator(); + const disputeHash = contract.disputeIDtoHash(disputeID); + dispute.disputeHash = disputeHash; + const relayedData = contract.disputeHashtoRelayedData(disputeHash); + dispute.arbitrationCost = relayedData.value0; + dispute.relayer = relayedData.value1; + dispute.save(); +} diff --git a/subgraph/src/mapping.ts b/subgraph/src/KlerosCore.ts similarity index 100% rename from subgraph/src/mapping.ts rename to subgraph/src/KlerosCore.ts diff --git a/subgraph/subgraph.yaml b/subgraph/subgraph.yaml index 4d2d80c71..495bbab1f 100644 --- a/subgraph/subgraph.yaml +++ b/subgraph/subgraph.yaml @@ -37,4 +37,44 @@ dataSources: handler: handleStakeSet - event: TokenAndETHShift(indexed address,indexed uint256,int256,int256) handler: handleTokenAndETHShift - file: ./src/mapping.ts + file: ./src/KlerosCore.ts + - kind: ethereum + name: HomeGateway + network: arbitrum-rinkeby + source: + address: "0x2Aa1f82d363f79c1E7a4CcF955Fb7E4306b9B260" + abi: HomeGateway + startBlock: 9609833 + mapping: + kind: ethereum/events + apiVersion: 0.0.5 + language: wasm/assemblyscript + entities: + - Dispute + abis: + - name: HomeGateway + file: ./abis/HomeGateway.json + eventHandlers: + - event: Dispute(indexed address,indexed uint256,uint256,uint256) + handler: handleDisputeEvent + file: ./src/HomeGateway.ts + - kind: ethereum + name: FastBridgeSender + network: arbitrum-rinkeby + source: + address: "0x0b9e03455Fed83f209Fa7ce596c93ba6aBAd1f46" + abi: FastBridgeSender + startBlock: 9609833 + mapping: + kind: ethereum/events + apiVersion: 0.0.5 + language: wasm/assemblyscript + entities: + - OutgoingMessage + abis: + - name: FastBridgeSender + file: ./abis/FastBridgeSender.json + eventHandlers: + - event: OutgoingMessage(address,bytes32,bytes) + handler: handleOutgoingMessage + file: ./src/FastBridgeSender.ts From b9200c740c50d599d5da992cf7ea37fb45caa184 Mon Sep 17 00:00:00 2001 From: alcercu Date: Wed, 6 Apr 2022 10:15:31 +0200 Subject: [PATCH 04/14] fix(style): code climate style errors --- subgraph/src/KlerosCore.ts | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/subgraph/src/KlerosCore.ts b/subgraph/src/KlerosCore.ts index a042ceef2..b534e0561 100644 --- a/subgraph/src/KlerosCore.ts +++ b/subgraph/src/KlerosCore.ts @@ -1,4 +1,4 @@ -import { BigInt } from "@graphprotocol/graph-ts" +import { BigInt } from "@graphprotocol/graph-ts"; import { KlerosCore, AppealDecision, @@ -7,7 +7,7 @@ import { NewPeriod, StakeSet, TokenAndETHShift as TokenAndETHShiftEvent -} from "../generated/KlerosCore/KlerosCore" +} from "../generated/KlerosCore/KlerosCore"; import { Juror, TokenAndETHShift, @@ -15,20 +15,21 @@ import { Round, Draw, Dispute, -} from "../generated/schema" +} from "../generated/schema"; function getPeriodName(index: number): string { if (index === 0) - return "Evidence" - if (index === 1) - return "Commit" - if (index === 2) - return "Vote" - if (index === 3) - return "Appeal" - if (index === 4) - return "Execution" - return "None" + return "Evidence"; + else if (index === 1) + return "Commit"; + else if (index === 2) + return "Vote"; + else if (index === 3) + return "Appeal"; + else if (index === 4) + return "Execution"; + else + return "None"; } export function handleAppealDecision(event: AppealDecision): void { @@ -127,7 +128,7 @@ export function handleStakeSet(event: StakeSet): void { export function handleTokenAndETHShift(event: TokenAndETHShiftEvent): void { const jurorAddress = event.params._account.toHexString(); const disputeID = event.params._disputeID; - const shiftID = `${jurorAddress}-${disputeID.toString()}` + const shiftID = `${jurorAddress}-${disputeID.toString()}`; const tokenAmount = event.params._tokenAmount; const ethAmount = event.params._ETHAmount; const shift = new TokenAndETHShift(shiftID); From cd28c6f2c0e9a5a86bf3ba7287c1262952ee5700 Mon Sep 17 00:00:00 2001 From: alcercu Date: Wed, 6 Apr 2022 10:21:08 +0200 Subject: [PATCH 05/14] fix(style): code climate style errors --- subgraph/src/KlerosCore.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/subgraph/src/KlerosCore.ts b/subgraph/src/KlerosCore.ts index b534e0561..92f81aee8 100644 --- a/subgraph/src/KlerosCore.ts +++ b/subgraph/src/KlerosCore.ts @@ -18,18 +18,8 @@ import { } from "../generated/schema"; function getPeriodName(index: number): string { - if (index === 0) - return "Evidence"; - else if (index === 1) - return "Commit"; - else if (index === 2) - return "Vote"; - else if (index === 3) - return "Appeal"; - else if (index === 4) - return "Execution"; - else - return "None"; + const periodArray = ["Evidence", "Commit", "Vote", "Appeal", "Execution"]; + return periodArray.at(index) || "None"; } export function handleAppealDecision(event: AppealDecision): void { From 29889ab847331c3769e48d963a6dd7881d79ab8e Mon Sep 17 00:00:00 2001 From: alcercu Date: Wed, 6 Apr 2022 10:25:41 +0200 Subject: [PATCH 06/14] fix(kleroscore mapping): explicit typing i32 --- subgraph/src/KlerosCore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subgraph/src/KlerosCore.ts b/subgraph/src/KlerosCore.ts index 92f81aee8..f5c50d51a 100644 --- a/subgraph/src/KlerosCore.ts +++ b/subgraph/src/KlerosCore.ts @@ -17,7 +17,7 @@ import { Dispute, } from "../generated/schema"; -function getPeriodName(index: number): string { +function getPeriodName(index: i32): string { const periodArray = ["Evidence", "Commit", "Vote", "Appeal", "Execution"]; return periodArray.at(index) || "None"; } From 79525384ad98cc32647498ab83655bd2fc38450d Mon Sep 17 00:00:00 2001 From: alcercu Date: Tue, 12 Apr 2022 15:59:25 +0200 Subject: [PATCH 07/14] chore: merge master and rename subgraph workspace --- subgraph/package.json | 8 ++-- yarn.lock | 103 ++++++++++++++++++------------------------ 2 files changed, 47 insertions(+), 64 deletions(-) diff --git a/subgraph/package.json b/subgraph/package.json index aea2f51bb..c81d8bda6 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -1,6 +1,6 @@ { - "name": "KlerosCore", - "license": "UNLICENSED", + "name": "@kleros/kleros-v2-subgraph", + "license": "MIT", "scripts": { "codegen": "graph codegen", "build": "graph build", @@ -10,7 +10,7 @@ "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 KlerosCore" }, "dependencies": { - "@graphprotocol/graph-cli": "^0.28.1", - "@graphprotocol/graph-ts": "0.26.0" + "@graphprotocol/graph-cli": "^0.29.0", + "@graphprotocol/graph-ts": "^0.26.0" } } diff --git a/yarn.lock b/yarn.lock index 2bba7f9de..c6fc49211 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,3 +1,6 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + __metadata: version: 5 cacheKey: 8 @@ -237,12 +240,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.11.1, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.9.2": - version: 7.17.7 - resolution: "@babel/runtime@npm:7.17.7" +"@babel/runtime@npm:^7.9.2": + version: 7.17.9 + resolution: "@babel/runtime@npm:7.17.9" dependencies: regenerator-runtime: ^0.13.4 - checksum: 68d195c1630bb91ac20e86635d292a17ebab7f361cfe79406b3f5a6cc2e59fa283ae5006568899abf869312c2b35b744bd407aea8ffdb650f1a68d07785d47e9 + checksum: 4d56bdb82890f386d5a57c40ef985a0ed7f0a78f789377a2d0c3e8826819e0f7f16ba0fe906d9b2241c5f7ca56630ef0653f5bb99f03771f7b87ff8af4bf5fe3 languageName: node linkType: hard @@ -1569,9 +1572,9 @@ __metadata: languageName: node linkType: hard -"@graphprotocol/graph-cli@npm:^0.28.1": - version: 0.28.1 - resolution: "@graphprotocol/graph-cli@npm:0.28.1" +"@graphprotocol/graph-cli@npm:^0.29.0": + version: 0.29.0 + resolution: "@graphprotocol/graph-cli@npm:0.29.0" dependencies: assemblyscript: 0.19.10 binary-install-raw: 0.0.13 @@ -1600,11 +1603,11 @@ __metadata: yaml: 1.9.2 bin: graph: bin/graph - checksum: c2bc40cb06a6a9a2bfe301aae447f5d232a6babf98b7f740110acd783ee60d70257b02ff631812e6cc423c97ce9b6be1ad5a08e27dfe2ef93aa17aea368d4e60 + checksum: 743b0c667fcbc80f216f208b4b05a94ac22355c5eba6b66371d4c61637e52958d727bef032549fdbe9946e3f8fc03f4a0fe0f6df2b3e5fd129618abfc131ef71 languageName: node linkType: hard -"@graphprotocol/graph-ts@npm:0.26.0": +"@graphprotocol/graph-ts@npm:^0.26.0": version: 0.26.0 resolution: "@graphprotocol/graph-ts@npm:0.26.0" dependencies: @@ -1721,6 +1724,15 @@ __metadata: languageName: unknown linkType: soft +"@kleros/kleros-v2-subgraph@workspace:subgraph": + version: 0.0.0-use.local + resolution: "@kleros/kleros-v2-subgraph@workspace:subgraph" + dependencies: + "@graphprotocol/graph-cli": ^0.29.0 + "@graphprotocol/graph-ts": ^0.26.0 + languageName: unknown + linkType: soft + "@kleros/ui-components-library@npm:^0.1.3": version: 0.1.3 resolution: "@kleros/ui-components-library@npm:0.1.3" @@ -3110,9 +3122,9 @@ __metadata: linkType: hard "@types/lodash@npm:^4.14.139": - version: 4.14.180 - resolution: "@types/lodash@npm:4.14.180" - checksum: fc42ae3473695cac6e91553f832fef8eb51a31c1c0381cafa81b00dc3efe18e279786bdda77caf0b90a8340ba2ba7aa46ae6541d69870565f775d04c89128bc1 + version: 4.14.181 + resolution: "@types/lodash@npm:4.14.181" + checksum: 0d1863d8383fd2f8bb42e9e3fc1d6255bb88ff034d6df848941063698944313dae944fc1270315613e3d303fae7c7a9a86085ad3235ed6204c56c4b0b3699aa9 languageName: node linkType: hard @@ -3789,15 +3801,6 @@ __metadata: languageName: node linkType: hard -"KlerosCore@workspace:subgraph": - version: 0.0.0-use.local - resolution: "KlerosCore@workspace:subgraph" - dependencies: - "@graphprotocol/graph-cli": ^0.28.1 - "@graphprotocol/graph-ts": 0.26.0 - languageName: unknown - linkType: soft - "abbrev@npm:1": version: 1.1.1 resolution: "abbrev@npm:1.1.1" @@ -13609,6 +13612,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^7.4.0": + version: 7.8.1 + resolution: "lru-cache@npm:7.8.1" + checksum: 31ea67388c9774300331d70f4affd5a433869bcf0fae5405f967d19d7b447930b713b0566a2e95362c9082034a8b496f3671ccf8f0c061d8e8048412663f9432 + languageName: node + linkType: hard + "lru-cache@npm:^7.5.1": version: 7.7.1 resolution: "lru-cache@npm:7.7.1" @@ -14728,34 +14738,6 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:2.6.0": - version: 2.6.0 - resolution: "node-fetch@npm:2.6.0" - checksum: 2b741e9315c1c07df4a291d0b304892fa7e8d623fe789fedd53f9bcb8d09102b07591b4b93e552a65dfc457eee9d5d879d0440aefdb64f2d78e7cb78cbad28e9 - languageName: node - linkType: hard - -"node-fetch@npm:2.6.1": - version: 2.6.1 - resolution: "node-fetch@npm:2.6.1" - checksum: 91075bedd57879117e310fbcc36983ad5d699e522edb1ebcdc4ee5294c982843982652925c3532729fdc86b2d64a8a827797a745f332040d91823c8752ee4d7c - languageName: node - linkType: hard - -"node-fetch@npm:^2.3.0, node-fetch@npm:^2.6.1": - version: 2.6.7 - resolution: "node-fetch@npm:2.6.7" - dependencies: - whatwg-url: ^5.0.0 - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - checksum: 8d816ffd1ee22cab8301c7756ef04f3437f18dace86a1dae22cf81db8ef29c0bf6655f3215cb0cdb22b420b6fe141e64b26905e7f33f9377a7fa59135ea3e10b - languageName: node - linkType: hard - "node-fetch@npm:^2.6.7": version: 2.6.7 resolution: "node-fetch@npm:2.6.7" @@ -14770,16 +14752,6 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:~1.7.1": - version: 1.7.3 - resolution: "node-fetch@npm:1.7.3" - dependencies: - encoding: ^0.1.11 - is-stream: ^1.0.1 - checksum: 3bb0528c05d541316ebe52770d71ee25a6dce334df4231fd55df41a644143e07f068637488c18a5b0c43f05041dbd3346752f9e19b50df50569a802484544d5b - languageName: node - linkType: hard - "node-forge@npm:^0.10.0": version: 0.10.0 resolution: "node-forge@npm:0.10.0" @@ -17912,7 +17884,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.3.5, semver@npm:^7.0.0, semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5": +"semver@npm:7.3.5, semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5": version: 7.3.5 resolution: "semver@npm:7.3.5" dependencies: @@ -17932,6 +17904,17 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.0.0": + version: 7.3.6 + resolution: "semver@npm:7.3.6" + dependencies: + lru-cache: ^7.4.0 + bin: + semver: bin/semver.js + checksum: 9845f96b22268190b30025e02feca391451f2bd49b2c51920c27cc56744f64cbe397df089018fdb347d4b4fd800eabbd85661870eb63eb28055d2b72e457f759 + languageName: node + linkType: hard + "semver@npm:~5.4.1": version: 5.4.1 resolution: "semver@npm:5.4.1" From 93f4d579b5ff2c2bb396c113869ae04c1b09a078 Mon Sep 17 00:00:00 2001 From: alcercu Date: Wed, 13 Apr 2022 17:59:24 +0200 Subject: [PATCH 08/14] fix(subgraph): use toHexString for the OutgoingMessage ID --- subgraph/src/FastBridgeSender.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subgraph/src/FastBridgeSender.ts b/subgraph/src/FastBridgeSender.ts index 2e351cb8f..c7fb0e142 100644 --- a/subgraph/src/FastBridgeSender.ts +++ b/subgraph/src/FastBridgeSender.ts @@ -7,7 +7,7 @@ import { export function handleOutgoingMessage(event: OutgoingMessageEvent): void { const outgoingMessage = new OutgoingMessage( - event.params.messageHash.toString() + event.params.messageHash.toHexString() ); outgoingMessage.target = event.params.target; outgoingMessage.messageHash = event.params.messageHash.toHex(); From e3a32d610a159e6a146e303fea8dfdab0770ab7e Mon Sep 17 00:00:00 2001 From: alcercu Date: Wed, 13 Apr 2022 18:00:13 +0200 Subject: [PATCH 09/14] feat(subgraph): add entities and logic to represent data points over time --- subgraph/schema.graphql | 35 +++++++++ subgraph/src/KlerosCore.ts | 143 ++++++++++++++++++++++++++++++++++++- 2 files changed, 177 insertions(+), 1 deletion(-) diff --git a/subgraph/schema.graphql b/subgraph/schema.graphql index 9bc08a6ee..492c0dd6c 100644 --- a/subgraph/schema.graphql +++ b/subgraph/schema.graphql @@ -92,3 +92,38 @@ type OutgoingMessage @entity { messageHash: String! message: String! } + +type PNKStakedDataPoint @entity { + id: ID! # Incrementally set, id 0 reserved for counter + timestamp: BigInt! + value: BigInt! + length: Int! # For the counter, to store number of datapoints +} + +type ETHPaidDataPoint @entity { + id: ID! # Incrementally set, id 0 reserved for counter + timestamp: BigInt! + value: BigInt! + length: Int! # For the counter, to store number of datapoints +} + +type PNKRedistributedDataPoint @entity { + id: ID! # Incrementally set, id 0 reserved for counter + timestamp: BigInt! + value: BigInt! + length: Int! # For the counter, to store number of datapoints +} + +type ActiveJurorsDataPoint @entity { + id: ID! # Incrementally set, id 0 reserved for counter + timestamp: BigInt! + value: BigInt! + length: Int! # For the counter, to store number of datapoints +} + +type CasesDataPoint @entity { + id: ID! # Incrementally set, id 0 reserved for counter + timestamp: BigInt! + value: BigInt! + length: Int! # For the counter, to store number of datapoints +} diff --git a/subgraph/src/KlerosCore.ts b/subgraph/src/KlerosCore.ts index f5c50d51a..74129372f 100644 --- a/subgraph/src/KlerosCore.ts +++ b/subgraph/src/KlerosCore.ts @@ -15,6 +15,11 @@ import { Round, Draw, Dispute, + PNKStakedDataPoint, + PNKRedistributedDataPoint, + ETHPaidDataPoint, + ActiveJurorsDataPoint, + CasesDataPoint, } from "../generated/schema"; function getPeriodName(index: i32): string { @@ -92,6 +97,20 @@ export function handleDraw(event: DrawEvent): void { draw.juror = drawnAddress.toHexString(); draw.voteID = voteID; draw.save(); + const dispute = Dispute.load(disputeID.toString()); + if (dispute) { + const jurorTokens = JurorTokensPerSubcourt.load( + `${drawnAddress.toHexString()}-${dispute.subcourtID.toString()}` + ); + if (jurorTokens) { + const contract = KlerosCore.bind(event.address); + const jurorBalance = contract.getJurorBalance( + drawnAddress, BigInt.fromString(dispute.subcourtID) + ); + jurorTokens.locked = jurorBalance.value1; + jurorTokens.save(); + } + } } export function handleStakeSet(event: StakeSet): void { @@ -99,20 +118,24 @@ export function handleStakeSet(event: StakeSet): void { let juror = Juror.load(jurorAddress); if (!juror) { juror = new Juror(jurorAddress); + updateActiveJurors(BigInt.fromI32(1), event.block.timestamp); } juror.save(); const subcourtID = event.params._subcourtID; const amountStaked = event.params._newTotalStake; const jurorTokensID = `${jurorAddress}-${subcourtID.toString()}`; let jurorTokens = JurorTokensPerSubcourt.load(jurorTokensID); + let previousStake: BigInt; if (!jurorTokens) { jurorTokens = new JurorTokensPerSubcourt(jurorTokensID); jurorTokens.juror = jurorAddress; jurorTokens.subcourt = subcourtID.toString(); jurorTokens.locked = BigInt.fromI32(0); - } + previousStake = BigInt.fromI32(0); + } else previousStake = jurorTokens.staked; jurorTokens.staked = amountStaked; jurorTokens.save(); + updateTotalPNKStaked(getDelta(previousStake, amountStaked), event.block.timestamp); } export function handleTokenAndETHShift(event: TokenAndETHShiftEvent): void { @@ -122,9 +145,127 @@ export function handleTokenAndETHShift(event: TokenAndETHShiftEvent): void { const tokenAmount = event.params._tokenAmount; const ethAmount = event.params._ETHAmount; const shift = new TokenAndETHShift(shiftID); + if (tokenAmount.gt(BigInt.fromI32(0))) { + updatePNKRedistributed(tokenAmount, event.block.timestamp); + } + updateETHPaid(ethAmount, event.block.timestamp); shift.juror = jurorAddress; shift.dispute = disputeID.toString(); shift.tokenAmount = tokenAmount; shift.ethAmount = ethAmount; shift.save(); } + +function getDelta(previousValue: BigInt, newValue: BigInt): BigInt { + return (newValue.minus(previousValue)); +} + +function updateTotalPNKStaked(delta: BigInt, timestamp: BigInt): void { + let counter = PNKStakedDataPoint.load("0"); + if (!counter) { + counter = new PNKStakedDataPoint("0"); + counter.length = 0; + counter.value = BigInt.fromI32(0); + counter.timestamp = BigInt.fromI32(0); + counter.save(); + } + const newLength = counter.length + 1; + const newValue = counter.value.plus(delta); + const newDataPoint = new PNKStakedDataPoint(newLength.toString()); + newDataPoint.value = newValue; + newDataPoint.timestamp = timestamp; + newDataPoint.length = newLength; + newDataPoint.save(); + counter.value = newValue; + counter.timestamp = timestamp; + counter.length = newLength; + counter.save(); +} + +function updatePNKRedistributed(delta: BigInt, timestamp: BigInt): void { + let counter = PNKRedistributedDataPoint.load("0"); + if (!counter) { + counter = new PNKRedistributedDataPoint("0"); + counter.length = 0; + counter.value = BigInt.fromI32(0); + counter.timestamp = BigInt.fromI32(0); + counter.save(); + } + const newLength = counter.length + 1; + const newValue = counter.value.plus(delta); + const newDataPoint = new PNKRedistributedDataPoint(newLength.toString()); + newDataPoint.value = newValue; + newDataPoint.timestamp = timestamp; + newDataPoint.length = newLength; + newDataPoint.save(); + counter.value = newValue; + counter.timestamp = timestamp; + counter.length = newLength; + counter.save(); +} + +function updateETHPaid(delta: BigInt, timestamp: BigInt): void { + let counter = ETHPaidDataPoint.load("0"); + if (!counter) { + counter = new ETHPaidDataPoint("0"); + counter.length = 0; + counter.value = BigInt.fromI32(0); + counter.timestamp = BigInt.fromI32(0); + counter.save(); + } + const newLength = counter.length + 1; + const newValue = counter.value.plus(delta); + const newDataPoint = new ETHPaidDataPoint(newLength.toString()); + newDataPoint.value = newValue; + newDataPoint.timestamp = timestamp; + newDataPoint.length = newLength; + newDataPoint.save(); + counter.value = newValue; + counter.timestamp = timestamp; + counter.length = newLength; + counter.save(); +} + +function updateActiveJurors(delta: BigInt, timestamp: BigInt): void { + let counter = ActiveJurorsDataPoint.load("0"); + if (!counter) { + counter = new ActiveJurorsDataPoint("0"); + counter.length = 0; + counter.value = BigInt.fromI32(0); + counter.timestamp = BigInt.fromI32(0); + counter.save(); + } + const newLength = counter.length + 1; + const newValue = counter.value.plus(delta); + const newDataPoint = new ActiveJurorsDataPoint(newLength.toString()); + newDataPoint.value = newValue; + newDataPoint.timestamp = timestamp; + newDataPoint.length = newLength; + newDataPoint.save(); + counter.value = newValue; + counter.timestamp = timestamp; + counter.length = newLength; + counter.save(); +} + +function updateCases(delta: BigInt, timestamp: BigInt): void { + let counter = CasesDataPoint.load("0"); + if (!counter) { + counter = new CasesDataPoint("0"); + counter.length = 0; + counter.value = BigInt.fromI32(0); + counter.timestamp = BigInt.fromI32(0); + counter.save(); + } + const newLength = counter.length + 1; + const newValue = counter.value.plus(delta); + const newDataPoint = new CasesDataPoint(newLength.toString()); + newDataPoint.value = newValue; + newDataPoint.timestamp = timestamp; + newDataPoint.length = newLength; + newDataPoint.save(); + counter.value = newValue; + counter.timestamp = timestamp; + counter.length = newLength; + counter.save(); +} From 1d3022d534e01f775f6f1ae94b40ac6866acd16e Mon Sep 17 00:00:00 2001 From: alcercu Date: Thu, 14 Apr 2022 10:53:06 +0200 Subject: [PATCH 10/14] refactor(subgraph): reduce code duplication --- subgraph/src/KlerosCore.ts | 126 ++++++++----------------------------- 1 file changed, 25 insertions(+), 101 deletions(-) diff --git a/subgraph/src/KlerosCore.ts b/subgraph/src/KlerosCore.ts index 74129372f..fcf0791a5 100644 --- a/subgraph/src/KlerosCore.ts +++ b/subgraph/src/KlerosCore.ts @@ -1,4 +1,4 @@ -import { BigInt } from "@graphprotocol/graph-ts"; +import { BigInt, store, Entity, Value } from "@graphprotocol/graph-ts"; import { KlerosCore, AppealDecision, @@ -15,11 +15,6 @@ import { Round, Draw, Dispute, - PNKStakedDataPoint, - PNKRedistributedDataPoint, - ETHPaidDataPoint, - ActiveJurorsDataPoint, - CasesDataPoint, } from "../generated/schema"; function getPeriodName(index: i32): string { @@ -135,7 +130,9 @@ export function handleStakeSet(event: StakeSet): void { } else previousStake = jurorTokens.staked; jurorTokens.staked = amountStaked; jurorTokens.save(); - updateTotalPNKStaked(getDelta(previousStake, amountStaked), event.block.timestamp); + updateTotalPNKStaked( + getDelta(previousStake, amountStaked), event.block.timestamp + ); } export function handleTokenAndETHShift(event: TokenAndETHShiftEvent): void { @@ -160,112 +157,39 @@ function getDelta(previousValue: BigInt, newValue: BigInt): BigInt { return (newValue.minus(previousValue)); } -function updateTotalPNKStaked(delta: BigInt, timestamp: BigInt): void { - let counter = PNKStakedDataPoint.load("0"); +function updateDataPoint(delta: BigInt, timestamp: BigInt, entityName: string): void { + let counter = store.get(entityName, "0"); if (!counter) { - counter = new PNKStakedDataPoint("0"); - counter.length = 0; - counter.value = BigInt.fromI32(0); - counter.timestamp = BigInt.fromI32(0); - counter.save(); + counter = new Entity(); + counter.set("length", Value.fromI32(0)); + counter.set("value", Value.fromBigInt(BigInt.fromI32(0))); } - const newLength = counter.length + 1; - const newValue = counter.value.plus(delta); - const newDataPoint = new PNKStakedDataPoint(newLength.toString()); - newDataPoint.value = newValue; - newDataPoint.timestamp = timestamp; - newDataPoint.length = newLength; - newDataPoint.save(); - counter.value = newValue; - counter.timestamp = timestamp; - counter.length = newLength; - counter.save(); + const newLength = counter.get("length")!.toI32() + 1; + const newValue = counter.get("value")!.toBigInt().plus(delta); + const newDataPoint = new Entity(); + newDataPoint.set("length", Value.fromI32(newLength)); + newDataPoint.set("value", Value.fromBigInt(newValue)); + newDataPoint.set("timestamp", Value.fromBigInt(timestamp)); + store.set(entityName, newLength.toString(), newDataPoint); + store.set(entityName, "0", newDataPoint); +} + +function updateTotalPNKStaked(delta: BigInt, timestamp: BigInt): void { + updateDataPoint(delta, timestamp, "PNKStakedDataPoint"); } function updatePNKRedistributed(delta: BigInt, timestamp: BigInt): void { - let counter = PNKRedistributedDataPoint.load("0"); - if (!counter) { - counter = new PNKRedistributedDataPoint("0"); - counter.length = 0; - counter.value = BigInt.fromI32(0); - counter.timestamp = BigInt.fromI32(0); - counter.save(); - } - const newLength = counter.length + 1; - const newValue = counter.value.plus(delta); - const newDataPoint = new PNKRedistributedDataPoint(newLength.toString()); - newDataPoint.value = newValue; - newDataPoint.timestamp = timestamp; - newDataPoint.length = newLength; - newDataPoint.save(); - counter.value = newValue; - counter.timestamp = timestamp; - counter.length = newLength; - counter.save(); + updateDataPoint(delta, timestamp, "PNKRedistributedDataPoint"); } function updateETHPaid(delta: BigInt, timestamp: BigInt): void { - let counter = ETHPaidDataPoint.load("0"); - if (!counter) { - counter = new ETHPaidDataPoint("0"); - counter.length = 0; - counter.value = BigInt.fromI32(0); - counter.timestamp = BigInt.fromI32(0); - counter.save(); - } - const newLength = counter.length + 1; - const newValue = counter.value.plus(delta); - const newDataPoint = new ETHPaidDataPoint(newLength.toString()); - newDataPoint.value = newValue; - newDataPoint.timestamp = timestamp; - newDataPoint.length = newLength; - newDataPoint.save(); - counter.value = newValue; - counter.timestamp = timestamp; - counter.length = newLength; - counter.save(); + updateDataPoint(delta, timestamp, "ETHPaidDataPoint"); } function updateActiveJurors(delta: BigInt, timestamp: BigInt): void { - let counter = ActiveJurorsDataPoint.load("0"); - if (!counter) { - counter = new ActiveJurorsDataPoint("0"); - counter.length = 0; - counter.value = BigInt.fromI32(0); - counter.timestamp = BigInt.fromI32(0); - counter.save(); - } - const newLength = counter.length + 1; - const newValue = counter.value.plus(delta); - const newDataPoint = new ActiveJurorsDataPoint(newLength.toString()); - newDataPoint.value = newValue; - newDataPoint.timestamp = timestamp; - newDataPoint.length = newLength; - newDataPoint.save(); - counter.value = newValue; - counter.timestamp = timestamp; - counter.length = newLength; - counter.save(); + updateDataPoint(delta, timestamp, "ActiveJurorsDataPoint"); } function updateCases(delta: BigInt, timestamp: BigInt): void { - let counter = CasesDataPoint.load("0"); - if (!counter) { - counter = new CasesDataPoint("0"); - counter.length = 0; - counter.value = BigInt.fromI32(0); - counter.timestamp = BigInt.fromI32(0); - counter.save(); - } - const newLength = counter.length + 1; - const newValue = counter.value.plus(delta); - const newDataPoint = new CasesDataPoint(newLength.toString()); - newDataPoint.value = newValue; - newDataPoint.timestamp = timestamp; - newDataPoint.length = newLength; - newDataPoint.save(); - counter.value = newValue; - counter.timestamp = timestamp; - counter.length = newLength; - counter.save(); + updateDataPoint(delta, timestamp, "CasesDataPoint"); } From c8bc7528ac938fa6c61ae92d26b23e5571762d31 Mon Sep 17 00:00:00 2001 From: alcercu Date: Thu, 14 Apr 2022 11:52:52 +0200 Subject: [PATCH 11/14] refactor(subgraph): simplify handleDraw --- subgraph/src/KlerosCore.ts | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/subgraph/src/KlerosCore.ts b/subgraph/src/KlerosCore.ts index fcf0791a5..240b8d6ba 100644 --- a/subgraph/src/KlerosCore.ts +++ b/subgraph/src/KlerosCore.ts @@ -1,4 +1,10 @@ -import { BigInt, store, Entity, Value } from "@graphprotocol/graph-ts"; +import { + Address, + BigInt, + Entity, + Value, + store, +} from "@graphprotocol/graph-ts"; import { KlerosCore, AppealDecision, @@ -94,20 +100,24 @@ export function handleDraw(event: DrawEvent): void { draw.save(); const dispute = Dispute.load(disputeID.toString()); if (dispute) { - const jurorTokens = JurorTokensPerSubcourt.load( - `${drawnAddress.toHexString()}-${dispute.subcourtID.toString()}` + updateJurorBalance( + drawnAddress.toHexString(), dispute.subcourtID.toString(), event ); - if (jurorTokens) { - const contract = KlerosCore.bind(event.address); - const jurorBalance = contract.getJurorBalance( - drawnAddress, BigInt.fromString(dispute.subcourtID) - ); - jurorTokens.locked = jurorBalance.value1; - jurorTokens.save(); - } } } +function updateJurorBalance( + address: string, subcourt: string, event: DrawEvent +): void { + const jurorTokens = new JurorTokensPerSubcourt(`${address}-${subcourt}`); + const contract = KlerosCore.bind(event.address); + const jurorBalance = contract.getJurorBalance( + Address.fromString(address), BigInt.fromString(subcourt) + ); + jurorTokens.locked = jurorBalance.value1; + jurorTokens.save(); +} + export function handleStakeSet(event: StakeSet): void { const jurorAddress = event.params._address.toHexString(); let juror = Juror.load(jurorAddress); From 27c15ff02b068bdefb51292c10a956d24d12f9fc Mon Sep 17 00:00:00 2001 From: alcercu Date: Wed, 4 May 2022 11:24:27 +0200 Subject: [PATCH 12/14] feat(web): change id to be the daily timestamp --- subgraph/package.json | 2 +- subgraph/schema.graphql | 20 +++++--------------- subgraph/src/KlerosCore.ts | 9 ++++----- yarn.lock | 10 +++++----- 4 files changed, 15 insertions(+), 26 deletions(-) diff --git a/subgraph/package.json b/subgraph/package.json index c81d8bda6..cf61e7f3c 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -10,7 +10,7 @@ "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 KlerosCore" }, "dependencies": { - "@graphprotocol/graph-cli": "^0.29.0", + "@graphprotocol/graph-cli": "^0.29.1", "@graphprotocol/graph-ts": "^0.26.0" } } diff --git a/subgraph/schema.graphql b/subgraph/schema.graphql index 492c0dd6c..050152cbd 100644 --- a/subgraph/schema.graphql +++ b/subgraph/schema.graphql @@ -94,36 +94,26 @@ type OutgoingMessage @entity { } type PNKStakedDataPoint @entity { - id: ID! # Incrementally set, id 0 reserved for counter - timestamp: BigInt! + id: ID! # Will be the timestamp except for the counter which will be 0 value: BigInt! - length: Int! # For the counter, to store number of datapoints } type ETHPaidDataPoint @entity { - id: ID! # Incrementally set, id 0 reserved for counter - timestamp: BigInt! + id: ID! # Will be the timestamp except for the counter which will be 0 value: BigInt! - length: Int! # For the counter, to store number of datapoints } type PNKRedistributedDataPoint @entity { - id: ID! # Incrementally set, id 0 reserved for counter - timestamp: BigInt! + id: ID! # Will be the timestamp except for the counter which will be 0 value: BigInt! - length: Int! # For the counter, to store number of datapoints } type ActiveJurorsDataPoint @entity { - id: ID! # Incrementally set, id 0 reserved for counter - timestamp: BigInt! + id: ID! # Will be the timestamp except for the counter which will be 0 value: BigInt! - length: Int! # For the counter, to store number of datapoints } type CasesDataPoint @entity { - id: ID! # Incrementally set, id 0 reserved for counter - timestamp: BigInt! + id: ID! # Will be the timestamp except for the counter which will be 0 value: BigInt! - length: Int! # For the counter, to store number of datapoints } diff --git a/subgraph/src/KlerosCore.ts b/subgraph/src/KlerosCore.ts index 240b8d6ba..83e7049b1 100644 --- a/subgraph/src/KlerosCore.ts +++ b/subgraph/src/KlerosCore.ts @@ -74,6 +74,7 @@ export function handleDisputeCreation(event: DisputeCreation): void { round.penalties = roundInfo.value3; dispute.save(); round.save(); + updateCases(BigInt.fromI32(1), event.block.timestamp); } export function handleNewPeriod(event: NewPeriod): void { @@ -171,16 +172,14 @@ function updateDataPoint(delta: BigInt, timestamp: BigInt, entityName: string): let counter = store.get(entityName, "0"); if (!counter) { counter = new Entity(); - counter.set("length", Value.fromI32(0)); counter.set("value", Value.fromBigInt(BigInt.fromI32(0))); } - const newLength = counter.get("length")!.toI32() + 1; + let dayID = timestamp.toI32() / 86400 + let dayStartTimestamp = dayID * 86400 const newValue = counter.get("value")!.toBigInt().plus(delta); const newDataPoint = new Entity(); - newDataPoint.set("length", Value.fromI32(newLength)); newDataPoint.set("value", Value.fromBigInt(newValue)); - newDataPoint.set("timestamp", Value.fromBigInt(timestamp)); - store.set(entityName, newLength.toString(), newDataPoint); + store.set(entityName, dayStartTimestamp.toString(), newDataPoint); store.set(entityName, "0", newDataPoint); } diff --git a/yarn.lock b/yarn.lock index c6fc49211..bd3ab7816 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1572,9 +1572,9 @@ __metadata: languageName: node linkType: hard -"@graphprotocol/graph-cli@npm:^0.29.0": - version: 0.29.0 - resolution: "@graphprotocol/graph-cli@npm:0.29.0" +"@graphprotocol/graph-cli@npm:^0.29.1": + version: 0.29.1 + resolution: "@graphprotocol/graph-cli@npm:0.29.1" dependencies: assemblyscript: 0.19.10 binary-install-raw: 0.0.13 @@ -1603,7 +1603,7 @@ __metadata: yaml: 1.9.2 bin: graph: bin/graph - checksum: 743b0c667fcbc80f216f208b4b05a94ac22355c5eba6b66371d4c61637e52958d727bef032549fdbe9946e3f8fc03f4a0fe0f6df2b3e5fd129618abfc131ef71 + checksum: 1a93a210f65e6bfab0fc6c8d7a75dfc56c6443f058a0e65fac9c9478dafe1574f371c225ac7acd163885e28a0607db9c81d0dabbd40e4249d05730b4e71768b6 languageName: node linkType: hard @@ -1728,7 +1728,7 @@ __metadata: version: 0.0.0-use.local resolution: "@kleros/kleros-v2-subgraph@workspace:subgraph" dependencies: - "@graphprotocol/graph-cli": ^0.29.0 + "@graphprotocol/graph-cli": ^0.29.1 "@graphprotocol/graph-ts": ^0.26.0 languageName: unknown linkType: soft From e2f04cb5fa92c6fac312abd97ddd39b1e924a410 Mon Sep 17 00:00:00 2001 From: alcercu Date: Wed, 4 May 2022 15:59:26 +0200 Subject: [PATCH 13/14] refactor(web): fix styling --- subgraph/src/KlerosCore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subgraph/src/KlerosCore.ts b/subgraph/src/KlerosCore.ts index 83e7049b1..07055409f 100644 --- a/subgraph/src/KlerosCore.ts +++ b/subgraph/src/KlerosCore.ts @@ -174,8 +174,8 @@ function updateDataPoint(delta: BigInt, timestamp: BigInt, entityName: string): counter = new Entity(); counter.set("value", Value.fromBigInt(BigInt.fromI32(0))); } - let dayID = timestamp.toI32() / 86400 - let dayStartTimestamp = dayID * 86400 + const dayID = timestamp.toI32() / 86400; + const dayStartTimestamp = dayID * 86400; const newValue = counter.get("value")!.toBigInt().plus(delta); const newDataPoint = new Entity(); newDataPoint.set("value", Value.fromBigInt(newValue)); From d4a3553840929a65ff943442de39250ff67d3c6e Mon Sep 17 00:00:00 2001 From: alcercu Date: Fri, 3 Jun 2022 10:41:25 +0200 Subject: [PATCH 14/14] chore(subgraph): reference abis directly from contracts directory --- subgraph/abis/FastBridgeSender.json | 239 ------ subgraph/abis/HomeGateway.json | 336 -------- subgraph/abis/KlerosCore.json | 1129 --------------------------- subgraph/subgraph.yaml | 6 +- 4 files changed, 3 insertions(+), 1707 deletions(-) delete mode 100644 subgraph/abis/FastBridgeSender.json delete mode 100644 subgraph/abis/HomeGateway.json delete mode 100644 subgraph/abis/KlerosCore.json diff --git a/subgraph/abis/FastBridgeSender.json b/subgraph/abis/FastBridgeSender.json deleted file mode 100644 index ac27b4dc6..000000000 --- a/subgraph/abis/FastBridgeSender.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "address": "0x0b9e03455Fed83f209Fa7ce596c93ba6aBAd1f46", - "abi": [ - { - "inputs": [ - { - "internalType": "contract ISafeBridge", - "name": "_safebridge", - "type": "address" - }, - { - "internalType": "contract IFastBridgeReceiver", - "name": "_fastBridgeReceiver", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "messageHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "message", - "type": "bytes" - } - ], - "name": "OutgoingMessage", - "type": "event" - }, - { - "inputs": [], - "name": "fastBridgeReceiver", - "outputs": [ - { - "internalType": "contract IFastBridgeReceiver", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "fastSender", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "safebridge", - "outputs": [ - { - "internalType": "contract ISafeBridge", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_receiver", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - } - ], - "name": "sendFast", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_receiver", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - } - ], - "name": "sendSafe", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_fastSender", - "type": "address" - } - ], - "name": "setFastSender", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x8be78ae0b525d0fa74956c8fa9dfd82e73b37e0c742ebee0a8452cfa2e4d0bc8", - "receipt": { - "to": null, - "from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3", - "contractAddress": "0x0b9e03455Fed83f209Fa7ce596c93ba6aBAd1f46", - "transactionIndex": 0, - "gasUsed": "3163802", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1429a648bb019eca3b938c71d358c90d9eec53ce40e277623848fbcbd69fcad7", - "transactionHash": "0x8be78ae0b525d0fa74956c8fa9dfd82e73b37e0c742ebee0a8452cfa2e4d0bc8", - "logs": [], - "blockNumber": 9610369, - "cumulativeGasUsed": "122282", - "status": 1, - "byzantium": true - }, - "args": [ - "0x1406bC99873d16Cde3491F809f1Af9442cb5A338", - "0xD78DCddE2C5a2Bd4BB246Bc7dB6994b95f7c442C" - ], - "numDeployments": 1, - "solcInputHash": "0a1ec2a631b00a23a4a92b2eaceb36a5", - "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ISafeBridge\",\"name\":\"_safebridge\",\"type\":\"address\"},{\"internalType\":\"contract IFastBridgeReceiver\",\"name\":\"_fastBridgeReceiver\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"OutgoingMessage\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"fastBridgeReceiver\",\"outputs\":[{\"internalType\":\"contract IFastBridgeReceiver\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fastSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"safebridge\",\"outputs\":[{\"internalType\":\"contract ISafeBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"}],\"name\":\"sendFast\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"}],\"name\":\"sendSafe\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_fastSender\",\"type\":\"address\"}],\"name\":\"setFastSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"sendFast(address,bytes)\":{\"params\":{\"_calldata\":\"The receiving domain encoded message data.\",\"_receiver\":\"The L1 contract address who will receive the calldata\"}},\"sendSafe(address,bytes)\":{\"params\":{\"_calldata\":\"The receiving domain encoded message data.\",\"_receiver\":\"The L1 contract address who will receive the calldata\"}}},\"version\":1},\"userdoc\":{\"events\":{\"OutgoingMessage(address,bytes32,bytes)\":{\"notice\":\"The bridgers need to watch for these events and relay the messageHash on the FastBridgeReceiver.\"}},\"kind\":\"user\",\"methods\":{\"sendFast(address,bytes)\":{\"notice\":\"Sends an arbitrary message from one domain to another via the fast bridge mechanism\"},\"sendSafe(address,bytes)\":{\"notice\":\"Sends an arbitrary message from one domain to another via the safe bridge mechanism, which relies on the chain's native bridge. It is unnecessary during normal operations but essential only in case of challenge. It may require some ETH (or whichever native token) to pay for the bridging cost, depending on the underlying safe bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridge/FastBridgeSender.sol\":\"FastBridgeSender\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridge/FastBridgeSender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@shalzz]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./interfaces/ISafeBridge.sol\\\";\\nimport \\\"./interfaces/IFastBridgeSender.sol\\\";\\nimport \\\"./interfaces/IFastBridgeReceiver.sol\\\";\\n\\ncontract FastBridgeSender is IFastBridgeSender {\\n ISafeBridge public safebridge;\\n IFastBridgeReceiver public fastBridgeReceiver;\\n address public fastSender;\\n\\n /**\\n * The bridgers need to watch for these events and\\n * relay the messageHash on the FastBridgeReceiver.\\n */\\n event OutgoingMessage(address target, bytes32 messageHash, bytes message);\\n\\n constructor(ISafeBridge _safebridge, IFastBridgeReceiver _fastBridgeReceiver) {\\n safebridge = _safebridge;\\n fastBridgeReceiver = _fastBridgeReceiver;\\n }\\n\\n function setFastSender(address _fastSender) external {\\n require(fastSender == address(0));\\n fastSender = _fastSender;\\n }\\n\\n /**\\n * Sends an arbitrary message from one domain to another\\n * via the fast bridge mechanism\\n *\\n * @param _receiver The L1 contract address who will receive the calldata\\n * @param _calldata The receiving domain encoded message data.\\n */\\n function sendFast(address _receiver, bytes memory _calldata) external {\\n require(msg.sender == fastSender, \\\"Access not allowed: Fast Sender only.\\\");\\n\\n // Encode the receiver address with the function signature + arguments i.e calldata\\n bytes memory encodedData = abi.encode(_receiver, _calldata);\\n\\n emit OutgoingMessage(_receiver, keccak256(encodedData), encodedData);\\n }\\n\\n /**\\n * Sends an arbitrary message from one domain to another\\n * via the safe bridge mechanism, which relies on the chain's native bridge.\\n *\\n * It is unnecessary during normal operations but essential only in case of challenge.\\n *\\n * It may require some ETH (or whichever native token) to pay for the bridging cost,\\n * depending on the underlying safe bridge.\\n *\\n * @param _receiver The L1 contract address who will receive the calldata\\n * @param _calldata The receiving domain encoded message data.\\n */\\n function sendSafe(address _receiver, bytes memory _calldata) external payable {\\n // The safe bridge sends the encoded data to the FastBridgeReceiver\\n // in order for the FastBridgeReceiver to resolve any potential\\n // challenges and then forwards the message to the actual\\n // intended recipient encoded in `data`\\n // TODO: For this encodedData needs to be wrapped into an\\n // IFastBridgeReceiver function.\\n // TODO: add access checks for this on the FastBridgeReceiver.\\n // TODO: how much ETH should be provided for bridging? add an ISafeBridge.bridgingCost()\\n bytes memory encodedData = abi.encode(_receiver, _calldata);\\n safebridge.sendSafe{value: msg.value}(address(fastBridgeReceiver), encodedData);\\n }\\n}\\n\",\"keccak256\":\"0x38b58a84e65e83b015c2ff77333129656a759b803118870db9e2bc0a0453c3eb\",\"license\":\"MIT\"},\"src/bridge/interfaces/IFastBridgeReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\ninterface IFastBridgeReceiver {\\n function claim(bytes32 _messageHash) external payable;\\n\\n function verifyAndRelay(bytes32 _messageHash, bytes memory _calldata) external;\\n\\n function withdrawClaimDeposit(bytes32 _messageHash) external;\\n\\n function claimDeposit() external view returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x1d7f6a6ed2c2b88f51833cba6091c57a43af2915a265395ad11aad08b1f7285d\",\"license\":\"MIT\"},\"src/bridge/interfaces/IFastBridgeSender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\ninterface IFastBridgeSender {\\n /**\\n * Sends an arbitrary message from one domain to another\\n * via the fast bridge mechanism\\n *\\n * TODO: probably needs some access control either on the sender side\\n * or the receiver side\\n *\\n * @param _receiver The L1 contract address who will receive the calldata\\n * @param _calldata The receiving domain encoded message data.\\n */\\n function sendFast(address _receiver, bytes memory _calldata) external;\\n}\\n\",\"keccak256\":\"0xcbf3e9b5e153940b73ab5f09469eaf2fb24a1effac83c3786b27f785c325ff2e\",\"license\":\"MIT\"},\"src/bridge/interfaces/ISafeBridge.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\ninterface ISafeBridge {\\n /**\\n * Sends an arbitrary message from one domain to another.\\n *\\n * @param _receiver The L1 contract address who will receive the calldata\\n * @param _calldata The L2 encoded message data.\\n * @return Unique id to track the message request/transaction.\\n */\\n function sendSafe(address _receiver, bytes memory _calldata) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2e7ab23dc7721f51f3d115ea3a06c590869e8671ed824987756ab4bb224845d1\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516105b23803806105b283398101604081905261002f91610078565b600080546001600160a01b039384166001600160a01b031991821617909155600180549290931691161790556100b2565b6001600160a01b038116811461007557600080fd5b50565b6000806040838503121561008b57600080fd5b825161009681610060565b60208401519092506100a781610060565b809150509250929050565b6104f1806100c16000396000f3fe6080604052600436106100555760003560e01c80630d85ec7e1461005a57806346c2cfee146100965780638f516b0d146100b857806398ec20ec146100d8578063be44ae1c146100f8578063d96a36ca1461010b575b600080fd5b34801561006657600080fd5b5060005461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b3480156100a257600080fd5b506100b66100b13660046102ff565b61012b565b005b3480156100c457600080fd5b5060025461007a906001600160a01b031681565b3480156100e457600080fd5b506100b66100f3366004610337565b610163565b6100b6610106366004610337565b61023c565b34801561011757600080fd5b5060015461007a906001600160a01b031681565b6002546001600160a01b03161561014157600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146101cf5760405162461bcd60e51b815260206004820152602560248201527f416363657373206e6f7420616c6c6f7765643a20466173742053656e6465722060448201526437b7363c9760d91b606482015260840160405180910390fd5b600082826040516020016101e4929190610446565b60405160208183030381529060405290507f885ffc934437efa035b94d89742209ddef30dac81f0aadbb92d520cd54dc2d398382805190602001208360405161022f93929190610472565b60405180910390a1505050565b60008282604051602001610251929190610446565b60408051601f1981840301815290829052600054600154632f912b8760e21b84529193506001600160a01b039081169263be44ae1c92349261029a929116908690600401610446565b60206040518083038185885af11580156102b8573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906102dd91906104a2565b50505050565b80356001600160a01b03811681146102fa57600080fd5b919050565b60006020828403121561031157600080fd5b61031a826102e3565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561034a57600080fd5b610353836102e3565b9150602083013567ffffffffffffffff8082111561037057600080fd5b818501915085601f83011261038457600080fd5b81358181111561039657610396610321565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610321565b816040528281528860208487010111156103d757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000815180845260005b8181101561041f57602081850181015186830182015201610403565b81811115610431576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061046a908301846103f9565b949350505050565b60018060a01b038416815282602082015260606040820152600061049960608301846103f9565b95945050505050565b6000602082840312156104b457600080fd5b505191905056fea264697066735822122027798849f47017ea415e2d49b22f4ac53ed207353ed98ef0272d1f23362730d864736f6c634300080a0033", - "deployedBytecode": "0x6080604052600436106100555760003560e01c80630d85ec7e1461005a57806346c2cfee146100965780638f516b0d146100b857806398ec20ec146100d8578063be44ae1c146100f8578063d96a36ca1461010b575b600080fd5b34801561006657600080fd5b5060005461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b3480156100a257600080fd5b506100b66100b13660046102ff565b61012b565b005b3480156100c457600080fd5b5060025461007a906001600160a01b031681565b3480156100e457600080fd5b506100b66100f3366004610337565b610163565b6100b6610106366004610337565b61023c565b34801561011757600080fd5b5060015461007a906001600160a01b031681565b6002546001600160a01b03161561014157600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146101cf5760405162461bcd60e51b815260206004820152602560248201527f416363657373206e6f7420616c6c6f7765643a20466173742053656e6465722060448201526437b7363c9760d91b606482015260840160405180910390fd5b600082826040516020016101e4929190610446565b60405160208183030381529060405290507f885ffc934437efa035b94d89742209ddef30dac81f0aadbb92d520cd54dc2d398382805190602001208360405161022f93929190610472565b60405180910390a1505050565b60008282604051602001610251929190610446565b60408051601f1981840301815290829052600054600154632f912b8760e21b84529193506001600160a01b039081169263be44ae1c92349261029a929116908690600401610446565b60206040518083038185885af11580156102b8573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906102dd91906104a2565b50505050565b80356001600160a01b03811681146102fa57600080fd5b919050565b60006020828403121561031157600080fd5b61031a826102e3565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561034a57600080fd5b610353836102e3565b9150602083013567ffffffffffffffff8082111561037057600080fd5b818501915085601f83011261038457600080fd5b81358181111561039657610396610321565b604051601f8201601f19908116603f011681019083821181831017156103be576103be610321565b816040528281528860208487010111156103d757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000815180845260005b8181101561041f57602081850181015186830182015201610403565b81811115610431576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061046a908301846103f9565b949350505050565b60018060a01b038416815282602082015260606040820152600061049960608301846103f9565b95945050505050565b6000602082840312156104b457600080fd5b505191905056fea264697066735822122027798849f47017ea415e2d49b22f4ac53ed207353ed98ef0272d1f23362730d864736f6c634300080a0033", - "devdoc": { - "kind": "dev", - "methods": { - "sendFast(address,bytes)": { - "params": { - "_calldata": "The receiving domain encoded message data.", - "_receiver": "The L1 contract address who will receive the calldata" - } - }, - "sendSafe(address,bytes)": { - "params": { - "_calldata": "The receiving domain encoded message data.", - "_receiver": "The L1 contract address who will receive the calldata" - } - } - }, - "version": 1 - }, - "userdoc": { - "events": { - "OutgoingMessage(address,bytes32,bytes)": { - "notice": "The bridgers need to watch for these events and relay the messageHash on the FastBridgeReceiver." - } - }, - "kind": "user", - "methods": { - "sendFast(address,bytes)": { - "notice": "Sends an arbitrary message from one domain to another via the fast bridge mechanism" - }, - "sendSafe(address,bytes)": { - "notice": "Sends an arbitrary message from one domain to another via the safe bridge mechanism, which relies on the chain's native bridge. It is unnecessary during normal operations but essential only in case of challenge. It may require some ETH (or whichever native token) to pay for the bridging cost, depending on the underlying safe bridge." - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 8249, - "contract": "src/bridge/FastBridgeSender.sol:FastBridgeSender", - "label": "safebridge", - "offset": 0, - "slot": "0", - "type": "t_contract(ISafeBridge)8507" - }, - { - "astId": 8252, - "contract": "src/bridge/FastBridgeSender.sol:FastBridgeSender", - "label": "fastBridgeReceiver", - "offset": 0, - "slot": "1", - "type": "t_contract(IFastBridgeReceiver)8483" - }, - { - "astId": 8254, - "contract": "src/bridge/FastBridgeSender.sol:FastBridgeSender", - "label": "fastSender", - "offset": 0, - "slot": "2", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_contract(IFastBridgeReceiver)8483": { - "encoding": "inplace", - "label": "contract IFastBridgeReceiver", - "numberOfBytes": "20" - }, - "t_contract(ISafeBridge)8507": { - "encoding": "inplace", - "label": "contract ISafeBridge", - "numberOfBytes": "20" - } - } - } -} diff --git a/subgraph/abis/HomeGateway.json b/subgraph/abis/HomeGateway.json deleted file mode 100644 index 8025c7171..000000000 --- a/subgraph/abis/HomeGateway.json +++ /dev/null @@ -1,336 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract IArbitrator", - "name": "_arbitrator", - "type": "address" - }, - { - "internalType": "contract IFastBridgeSender", - "name": "_fastbridge", - "type": "address" - }, - { - "internalType": "address", - "name": "_foreignGateway", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_foreignChainID", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrator", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_metaEvidenceID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_evidenceGroupID", - "type": "uint256" - } - ], - "name": "Dispute", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrator", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_evidenceGroupID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "_party", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "Evidence", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_metaEvidenceID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "_evidence", - "type": "string" - } - ], - "name": "MetaEvidence", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IArbitrator", - "name": "_arbitrator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "Ruling", - "type": "event" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "contract IArbitrator", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_disputeHash", - "type": "bytes32" - } - ], - "name": "disputeHashToHomeID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "disputeHashtoID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "disputeHashtoRelayedData", - "outputs": [ - { - "internalType": "uint256", - "name": "arbitrationCost", - "type": "uint256" - }, - { - "internalType": "address", - "name": "relayer", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputeIDtoHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "fastbridge", - "outputs": [ - { - "internalType": "contract IFastBridgeSender", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "foreignChainID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "foreignGateway", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_originalChainID", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_originalBlockHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_originalDisputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_choices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - }, - { - "internalType": "address", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "relayCreateDispute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_ruling", - "type": "uint256" - } - ], - "name": "rule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/subgraph/abis/KlerosCore.json b/subgraph/abis/KlerosCore.json deleted file mode 100644 index 2bdbf223e..000000000 --- a/subgraph/abis/KlerosCore.json +++ /dev/null @@ -1,1129 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - }, - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - }, - { - "internalType": "contract IDisputeKit", - "name": "_disputeKit", - "type": "address" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "uint256", - "name": "_sortitionSumTreeK", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrable", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealDecision", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrable", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "AppealPossible", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "contract IArbitrable", - "name": "_arbitrable", - "type": "address" - } - ], - "name": "DisputeCreation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_appeal", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_voteID", - "type": "uint256" - } - ], - "name": "Draw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum KlerosCore.Period", - "name": "_period", - "type": "uint8" - } - ], - "name": "NewPeriod", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_subcourtID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_newTotalStake", - "type": "uint256" - } - ], - "name": "StakeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_tokenAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "_ETHAmount", - "type": "int256" - } - ], - "name": "TokenAndETHShift", - "type": "event" - }, - { - "inputs": [], - "name": "ALPHA_DIVISOR", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_STAKE_PATHS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_JURORS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NON_PAYABLE_AMOUNT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IDisputeKit", - "name": "_disputeKitAddress", - "type": "address" - }, - { - "internalType": "uint8", - "name": "_disputeKitID", - "type": "uint8" - } - ], - "name": "addNewDisputeKit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "appealPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "arbitrationCost", - "outputs": [ - { - "internalType": "uint256", - "name": "cost", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_subcourtID", - "type": "uint256" - } - ], - "name": "areVotesHidden", - "outputs": [ - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_governor", - "type": "address" - } - ], - "name": "changeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_jurorProsecutionModule", - "type": "address" - } - ], - "name": "changeJurorProsecutionModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pinakion", - "type": "address" - } - ], - "name": "changePinakion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - } - ], - "name": "changeSubcourtAlpha", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - } - ], - "name": "changeSubcourtJurorFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - } - ], - "name": "changeSubcourtJurorsForJump", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - } - ], - "name": "changeSubcourtMinStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - } - ], - "name": "changeSubcourtTimesPerPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "courts", - "outputs": [ - { - "internalType": "uint96", - "name": "parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "supportedDisputeKits", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numberOfChoices", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_extraData", - "type": "bytes" - } - ], - "name": "createDispute", - "outputs": [ - { - "internalType": "uint256", - "name": "disputeID", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_parent", - "type": "uint96" - }, - { - "internalType": "bool", - "name": "_hiddenVotes", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_minStake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_alpha", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_feeForJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_jurorsForCourtJump", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "_timesPerPeriod", - "type": "uint256[4]" - }, - { - "internalType": "uint256", - "name": "_sortitionSumTreeK", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_supportedDisputeKits", - "type": "uint256" - } - ], - "name": "createSubcourt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "currentRuling", - "outputs": [ - { - "internalType": "uint256", - "name": "ruling", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputeKits", - "outputs": [ - { - "internalType": "contract IDisputeKit", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "uint96", - "name": "subcourtID", - "type": "uint96" - }, - { - "internalType": "contract IArbitrable", - "name": "arbitrated", - "type": "address" - }, - { - "internalType": "contract IDisputeKit", - "name": "disputeKit", - "type": "address" - }, - { - "internalType": "enum KlerosCore.Period", - "name": "period", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "ruled", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "lastPeriodChange", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nbVotes", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "draw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_appeal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_iterations", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_destination", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeGovernorProposal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "executeRuling", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getCurrentPeriod", - "outputs": [ - { - "internalType": "enum KlerosCore.Period", - "name": "period", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_juror", - "type": "address" - }, - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - } - ], - "name": "getJurorBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "staked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "locked", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getNumberOfRounds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_round", - "type": "uint256" - } - ], - "name": "getRoundInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "tokensAtStakePerJuror", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalFeesForJurors", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "repartitions", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "penalties", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "drawnJurors", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - } - ], - "name": "getSortitionSumTree", - "outputs": [ - { - "internalType": "uint256", - "name": "K", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "stack", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "nodes", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_nodeIndex", - "type": "uint256" - } - ], - "name": "getSortitionSumTreeID", - "outputs": [ - { - "internalType": "bytes32", - "name": "ID", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "getSubcourtID", - "outputs": [ - { - "internalType": "uint256", - "name": "subcourtID", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - } - ], - "name": "getTimesPerPeriod", - "outputs": [ - { - "internalType": "uint256[4]", - "name": "timesPerPeriod", - "type": "uint256[4]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "isRuled", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "jurorProsecutionModule", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_disputeID", - "type": "uint256" - } - ], - "name": "passPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pinakion", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint8[]", - "name": "_disputeKitIDs", - "type": "uint8[]" - }, - { - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "setDisputeKits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint96", - "name": "_subcourtID", - "type": "uint96" - }, - { - "internalType": "uint256", - "name": "_stake", - "type": "uint256" - } - ], - "name": "setStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/subgraph/subgraph.yaml b/subgraph/subgraph.yaml index 495bbab1f..ff0edec82 100644 --- a/subgraph/subgraph.yaml +++ b/subgraph/subgraph.yaml @@ -23,7 +23,7 @@ dataSources: - TokenAndETHShift abis: - name: KlerosCore - file: ./abis/KlerosCore.json + file: ../contracts/deployments/arbitrumRinkeby/KlerosCore.json eventHandlers: - event: AppealDecision(indexed uint256,indexed address) handler: handleAppealDecision @@ -53,7 +53,7 @@ dataSources: - Dispute abis: - name: HomeGateway - file: ./abis/HomeGateway.json + file: ../contracts/deployments/arbitrumRinkeby/HomeGateway.json eventHandlers: - event: Dispute(indexed address,indexed uint256,uint256,uint256) handler: handleDisputeEvent @@ -73,7 +73,7 @@ dataSources: - OutgoingMessage abis: - name: FastBridgeSender - file: ./abis/FastBridgeSender.json + file: ../contracts/deployments/arbitrumRinkeby/FastBridgeSender.json eventHandlers: - event: OutgoingMessage(address,bytes32,bytes) handler: handleOutgoingMessage