Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,5 @@ dataset/local
build
generated
subgraph.yaml
.env.*
!.env.example
4 changes: 2 additions & 2 deletions config/staging.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"network": "near-mainnet",
"contract": "mock-proposal.near",
"startBlock": 152402973
"contract": "test-proposal.near",
"startBlock": 156573568
}
4 changes: 2 additions & 2 deletions config/testnet.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"network": "near-testnet",
"contract": "reduce-inflation.testnet",
"startBlock": 197937630
"contract": "mock-proposal-alpha.testnet",
"startBlock": 206268236
}
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"scripts": {
"deploy:testnet": "pnpm config:testnet && pnpm codegen && pnpm deploysubgraph",
"deploy:staging": "pnpm config:staging && pnpm codegen && pnpm deploysubgraph",
"deploy:mainnet": "pnpm config:mainnet && pnpm codegen && pnpm deploysubgraph",
"deploy:testnet": "pnpm config:testnet && pnpm codegen && pnpm deploysubgraph:testnet",
"deploy:staging": "pnpm config:staging && pnpm codegen && pnpm deploysubgraph:staging",
"deploy:mainnet": "pnpm config:mainnet && pnpm codegen && pnpm deploysubgraph:production",
"config:testnet": "mustache config/testnet.json subgraph.template.yaml > subgraph.yaml",
"config:staging": "mustache config/staging.json subgraph.template.yaml > subgraph.yaml",
"config:mainnet": "mustache config/mainnet.json subgraph.template.yaml > subgraph.yaml",
"codegen": "graph codegen",
"deploysubgraph": "env-cmd pnpm deploysubgraph:studio",
"deploysubgraph:testnet": "env-cmd -f .env.testnet pnpm deploysubgraph:studio",
"deploysubgraph:staging": "env-cmd -f .env.staging pnpm deploysubgraph:studio",
"deploysubgraph:production": "env-cmd -f .env.production pnpm deploysubgraph:studio",
"deploysubgraph:studio": "graph deploy ${SLUG} --deploy-key ${DEPLOY_KEY}",
"build": "rm -rf dist && tsc",
"server:start": "node dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/server/config/staging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const config: Config = {
nodeUrl: optionalEnv('NEAR_RPC') || 'https://near.lava.build',
subgraphApiUrl:
optionalEnv('SUBGRAPH_API_URL') ||
'https://api.studio.thegraph.com/query/112225/validator-voting-staging/v0.0.3',
'https://api.studio.thegraph.com/query/112225/validator-voting-staging/v0.0.4',
subgraphAPiKey: optionalEnv('SUBGRAPH_API_KEY'),
nearBlocksApiUrl: 'https://api.nearblocks.io/v2',
poolDetailContractId: 'pool-details.near',
votingContractId: 'mock-proposal.near',
votingContractId: 'test-proposal.near',
port: Number(requiredEnv('PORT')),
};

Expand Down
4 changes: 2 additions & 2 deletions src/server/config/testnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const config: Config = {
nodeUrl: optionalEnv('NEAR_RPC') || 'https://neart.lava.build',
subgraphApiUrl:
optionalEnv('SUBGRAPH_API_URL') ||
'https://api.studio.thegraph.com/query/112225/validator-voting-testnet/v0.0.2',
'https://api.studio.thegraph.com/query/112225/validator-voting-testnet/v0.0.3',
subgraphAPiKey: optionalEnv('SUBGRAPH_API_KEY'),
nearBlocksApiUrl: 'https://api-testnet.nearblocks.io/v2',
votingContractId: 'reduce-inflation.testnet',
votingContractId: 'mock-proposal-alpha.testnet',
port: Number(requiredEnv('PORT')),
};

Expand Down