Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/ts manifest #47

Merged
merged 11 commits into from
Oct 6, 2023
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR
on:
pull_request:
paths-ignore:
- '.github/workflows/**'
jobs:
pr:
name: pr
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 18
- run: yarn
- name: codegen
run: yarn codegen
# Need to update tsconfig inputs paths for this to work
# - name: build
# run: yarn build

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ package-lock.json
# Package files
*.jar

# Maven
# Generated files
target/
dist/
src/types
project.yaml

# JetBrains IDE
.idea/
Expand Down
3 changes: 2 additions & 1 deletion Agoric/agoric-starter/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ package-lock.json
# Package files
*.jar

# Maven
# Generated files
target/
dist/
src/types
project.yaml

# JetBrains IDE
.idea/
Expand Down
2 changes: 1 addition & 1 deletion Agoric/agoric-starter/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
volumes:
- ./:/app
command:
- ${SUB_COMMAND} # set SUB_COMMAND env variable to "test" to run tests
- ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests
- -f=/app
- --db-schema=app
- --workers=4
Expand Down
2 changes: 1 addition & 1 deletion Agoric/agoric-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@subql/cli": "latest",
"@subql/testing": "latest",
"@subql/node-cosmos": "latest",
"typescript": "^4.7.4"
"typescript": "^5.2.2"
},
"dependencies": {
"@subql/types-cosmos": "latest",
Expand Down
86 changes: 86 additions & 0 deletions Agoric/agoric-starter/project.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import {
SubqlCosmosDatasourceKind,
SubqlCosmosHandlerKind,
CosmosProject
} from "@subql/types-cosmos";


// Can expand the Datasource processor types via the genreic param
const project: CosmosProject = {
specVersion: "1.0.0",
version: "0.0.1",
name: "agoric-starter",
description:
"This project can be use as a starting point for developing your Cosmos agoric based SubQuery project",
runner: {
node: {
name: "@subql/node-cosmos",
version: ">=3.0.0",
},
query: {
name: "@subql/query",
version: "*",
},
},
schema: {
file: "./schema.graphql",
},
network: {
/* The genesis hash of the network (hash of block 0) */
chainId:
"agoric-3",
/**
* This endpoint must be a public non-pruned archive node
* Public nodes may be rate limited, which can affect indexing speed
* When developing your project we suggest getting a private API key
* You can get them from OnFinality for free https://app.onfinality.io
* https://documentation.onfinality.io/support/the-enhanced-api-service
*/
endpoint: ["https://agoric-rpc.stakely.io"],
dictionary: "https://api.subquery.network/sq/subquery/agoric-dictionary",
chaintypes: new Map([
["cosmos.slashing.v1beta1", {file: "./proto/cosmos/slashing/v1beta1/tx.proto", messages: ["MsgUnjail"]}],
["cosmos.gov.v1beta1", {file: "./proto/cosmos/gov/v1beta1/tx.proto", messages: ["MsgVoteWeighted"]}],
["cosmos.gov.v1beta1.gov", {
file: "./proto/cosmos/gov/v1beta1/gov.proto",
messages: ["WeightedVoteOption"]
}],
])
},
dataSources: [
{
kind: SubqlCosmosDatasourceKind.Runtime,
startBlock: 11628269,
mapping: {
file: './dist/index.js',
handlers: [
// {
// Using block handlers slows your project down as they can be executed with each and every block.
// Only use if you need to
// handler: 'handleEvent',
// kind: SubqlCosmosHandlerKind.Block,
// },
{
handler: 'handleEvent',
kind: SubqlCosmosHandlerKind.Event,
filter: {
type: 'transfer',
messageFilter: {
type: '/cosmos.bank.v1beta1.MsgSend'
}
}
},
{
handler: 'handleMessage',
kind: SubqlCosmosHandlerKind.Message,
filter: {
type: '/cosmos.bank.v1beta1.MsgSend'
}
}
]
},
},
],
};

export default project;
58 changes: 0 additions & 58 deletions Agoric/agoric-starter/project.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions Agoric/agoric-starter/src/types/CosmosMessageTypes.ts

This file was deleted.

4 changes: 0 additions & 4 deletions Agoric/agoric-starter/src/types/index.ts

This file was deleted.

94 changes: 0 additions & 94 deletions Agoric/agoric-starter/src/types/models/Message.ts

This file was deleted.

Loading
Loading