Skip to content

Commit

Permalink
Double quote
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin committed Feb 25, 2023
1 parent 030156e commit 1500e19
Show file tree
Hide file tree
Showing 15 changed files with 336 additions and 344 deletions.
Empty file modified .github/scripts/kubectl-config.sh
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Empty file modified scripts/build-graph.sh
100755 → 100644
Empty file.
Empty file modified scripts/build-manifest.sh
100755 → 100644
Empty file.
Empty file modified scripts/codegen.sh
100755 → 100644
Empty file.
70 changes: 32 additions & 38 deletions scripts/deploy.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
# #!/usr/bin/env bash

# # Exit script as soon as a command fails.
# set -o errexit

# # Run graph build
# npm run build:graph

# # Require $GRAPHKEY to be set
# if [[ -z "${GRAPHKEY}" ]]; then
# echo "Please set \$GRAPHKEY to your The Graph access token to run this command."
# exit 1
# fi

# # Use custom subgraph name based on target network
# if [[ "$NETWORK" != "gnosis" ]]; then
# SUBGRAPH_EXT="-${NETWORK}"
# else
# SUBGRAPH_EXT=""
# fi

# graph deploy --studio celeste-${SUBGRAPH_EXT}

# # # Select IPFS and The Graph nodes
# # if [[ "$NETWORK" = "rpc" ]]; then
# # IPFS_NODE="http://localhost:5001"
# # GRAPH_NODE="http://127.0.0.1:8020"
# # else
# # IPFS_NODE="https://api.thegraph.com/ipfs/"
# # GRAPH_NODE="https://api.thegraph.com/deploy/"
# # fi

# # # Deploy subgraph
# # graph deploy 1hive/celeste${SUBGRAPH_EXT} \
# # --ipfs ${IPFS_NODE} \
# # --node ${GRAPH_NODE} \
# # --access-token "$GRAPHKEY" > deploy-output.txt

#!/usr/bin/env bash

# Exit script as soon as a command fails.
set -o errexit

# Run graph build
npm run build:graph

# Require $GRAPHKEY to be set
if [[ -z "${GRAPHKEY}" ]]; then
echo "Please set \$GRAPHKEY to your The Graph access token to run this command."
exit 1
fi

# Use custom subgraph name based on target network
if [[ "$NETWORK" != "xdai" ]]; then
SUBGRAPH_EXT="-${NETWORK}"
else
SUBGRAPH_EXT=""
fi

# Select IPFS and The Graph nodes
if [[ "$NETWORK" = "rpc" ]]; then
IPFS_NODE="http://localhost:5001"
GRAPH_NODE="http://127.0.0.1:8020"
else
IPFS_NODE="https://api.thegraph.com/ipfs/"
GRAPH_NODE="https://api.thegraph.com/deploy/"
fi

# Deploy subgraph
graph deploy --studio celeste-gnosis
Empty file modified scripts/draw-schema.sh
100755 → 100644
Empty file.
48 changes: 24 additions & 24 deletions src/AragonCourt.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { BigInt, Bytes, Address, ethereum, log } from '@graphprotocol/graph-ts'
import { BLACKLISTED_MODULES } from '../helpers/blacklisted-modules'
import { updateCurrentSubscriptionPeriod } from './Subscriptions'
import { ERC20 as ERC20Contract } from '../types/AragonCourt/ERC20'
import { JurorsRegistry as JurorsRegistryContract } from '../types/templates/JurorsRegistry/JurorsRegistry'
import { BrightIdRegister as BrightIdRegisterContract } from '../types/AragonCourt/BrightIdRegister'
import { BigInt, Bytes, Address, ethereum, log } from "@graphprotocol/graph-ts"
import { BLACKLISTED_MODULES } from "../helpers/blacklisted-modules"
import { updateCurrentSubscriptionPeriod } from "./Subscriptions"
import { ERC20 as ERC20Contract } from "../types/AragonCourt/ERC20"
import { JurorsRegistry as JurorsRegistryContract } from "../types/templates/JurorsRegistry/JurorsRegistry"
import { BrightIdRegister as BrightIdRegisterContract } from "../types/AragonCourt/BrightIdRegister"
import {
ERC20,
CourtModule,
CourtConfig,
CourtTerm,
BrightIdRegisterModule,
JurorsRegistryModule,
} from '../types/schema'
} from "../types/schema"
import {
BrightIdRegister,
DisputeManager,
JurorsRegistry,
Treasury,
Voting,
Subscriptions,
} from '../types/templates'
} from "../types/templates"
import {
AragonCourt,
Heartbeat,
Expand All @@ -28,27 +28,27 @@ import {
ConfigGovernorChanged,
FeesUpdaterChanged,
ModulesGovernorChanged,
} from '../types/AragonCourt/AragonCourt'
} from "../types/AragonCourt/AragonCourt"

let DISPUTE_MANAGER_TYPE = 'DisputeManager'
let JURORS_REGISTRY_TYPE = 'JurorsRegistry'
let VOTING_TYPE = 'Voting'
let TREASURY_TYPE = 'Treasury'
let SUBSCRIPTIONS_TYPE = 'Subscriptions'
let BRIGHTID_REGISTER_TYPE = 'BrightIdRegister'
let DISPUTE_MANAGER_TYPE = "DisputeManager"
let JURORS_REGISTRY_TYPE = "JurorsRegistry"
let VOTING_TYPE = "Voting"
let TREASURY_TYPE = "Treasury"
let SUBSCRIPTIONS_TYPE = "Subscriptions"
let BRIGHTID_REGISTER_TYPE = "BrightIdRegister"

let DISPUTE_MANAGER_ID =
'0x14a6c70f0f6d449c014c7bbc9e68e31e79e8474fb03b7194df83109a2d888ae6'
"0x14a6c70f0f6d449c014c7bbc9e68e31e79e8474fb03b7194df83109a2d888ae6"
let JURORS_REGISTRY_ID =
'0x3b21d36b36308c830e6c4053fb40a3b6d79dde78947fbf6b0accd30720ab5370'
"0x3b21d36b36308c830e6c4053fb40a3b6d79dde78947fbf6b0accd30720ab5370"
let VOTING_ID =
'0x7cbb12e82a6d63ff16fe43977f43e3e2b247ecd4e62c0e340da8800a48c67346'
"0x7cbb12e82a6d63ff16fe43977f43e3e2b247ecd4e62c0e340da8800a48c67346"
let TREASURY_ID =
'0x06aa03964db1f7257357ef09714a5f0ca3633723df419e97015e0c7a3e83edb7'
"0x06aa03964db1f7257357ef09714a5f0ca3633723df419e97015e0c7a3e83edb7"
let SUBSCRIPTIONS_ID =
'0x2bfa3327fe52344390da94c32a346eeb1b65a8b583e4335a419b9471e88c1365'
"0x2bfa3327fe52344390da94c32a346eeb1b65a8b583e4335a419b9471e88c1365"
let BRIGHTID_REGISTER_ID =
'0xc8d8a5444a51ecc23e5091f18c4162834512a4bc5cae72c637db45c8c37b3329'
"0xc8d8a5444a51ecc23e5091f18c4162834512a4bc5cae72c637db45c8c37b3329"

export function handleHeartbeat(event: Heartbeat): void {
let config = loadOrCreateConfig(event.address, event)
Expand Down Expand Up @@ -114,7 +114,7 @@ export function handleModuleSet(event: ModuleSet): void {
let newModuleAddress: Address = event.params.addr

if (isModuleBlacklisted(newModuleAddress)) {
log.warning('Ignoring blacklisted module {}', [
log.warning("Ignoring blacklisted module {}", [
newModuleAddress.toHexString(),
])
return
Expand All @@ -123,7 +123,7 @@ export function handleModuleSet(event: ModuleSet): void {
// avoid duplicated modules
let config = CourtConfig.load(event.address.toHexString())!
if (isModuleAlreadySet(config.moduleAddresses, newModuleAddress)) {
log.warning('Ignoring already set module {}', [
log.warning("Ignoring already set module {}", [
newModuleAddress.toHexString(),
])
return
Expand Down Expand Up @@ -189,7 +189,7 @@ export function handleModuleSet(event: ModuleSet): void {
brightIdRegisterModule.verificationTimestampVariance = brightIdRegister.verificationTimestampVariance()
brightIdRegisterModule.save()
} else {
module.type = 'Unknown'
module.type = "Unknown"
}

let moduleAddresses = config.moduleAddresses
Expand Down
6 changes: 3 additions & 3 deletions src/Arbitrable.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Evidence } from '../types/schema'
import { ethereum, Bytes, BigInt, Address } from '@graphprotocol/graph-ts'
import { EvidenceSubmitted } from '../types/templates/DisputeManager/Arbitrable'
import { Evidence } from "../types/schema"
import { ethereum, Bytes, BigInt, Address } from "@graphprotocol/graph-ts"
import { EvidenceSubmitted } from "../types/templates/DisputeManager/Arbitrable"

export function handleEvidenceSubmittedWithArbitrator(
event: EvidenceSubmitted
Expand Down
8 changes: 4 additions & 4 deletions src/BrightIdRegister.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Address, BigInt, ethereum } from '@graphprotocol/graph-ts'
import { Juror } from '../types/schema'
import { BrightIdRegister as BrightIdRegisterContract } from '../types/AragonCourt/BrightIdRegister'
import { Register } from '../types/templates/BrightIdRegister/BrightIdRegister'
import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"
import { Juror } from "../types/schema"
import { BrightIdRegister as BrightIdRegisterContract } from "../types/AragonCourt/BrightIdRegister"
import { Register } from "../types/templates/BrightIdRegister/BrightIdRegister"

export function handleUserRegistered(event: Register): void {
updateJuror(event.params.sender, event)
Expand Down
Loading

0 comments on commit 1500e19

Please sign in to comment.