-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cfd32a7
commit c06fbec
Showing
46 changed files
with
2,027 additions
and
2,054 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,98 @@ | ||
import { | ||
SubqlCosmosDatasourceKind, | ||
SubqlCosmosHandlerKind, | ||
CosmosProject | ||
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: "*", | ||
}, | ||
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", | ||
}, | ||
schema: { | ||
file: "./schema.graphql", | ||
query: { | ||
name: "@subql/query", | ||
version: "*", | ||
}, | ||
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: [ | ||
}, | ||
schema: { | ||
file: "./schema.graphql", | ||
}, | ||
network: { | ||
/* The genesis hash of the network (hash of block 0) */ | ||
chainId: "agoric-3", | ||
/** | ||
* These endpoint(s) should be non-pruned archive nodes | ||
* Public nodes may be rate limited, which can affect indexing speed | ||
* When developing your project we suggest getting a private API key | ||
* We suggest providing an array of endpoints for increased speed and reliability | ||
*/ | ||
endpoint: ["https://agoric-rpc.stakely.io"], | ||
dictionary: "https://api.subquery.network/sq/subquery/agoric-dictionary", | ||
chaintypes: new Map([ | ||
[ | ||
"cosmos.slashing.v1beta1", | ||
{ | ||
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' | ||
} | ||
} | ||
] | ||
}, | ||
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; | ||
export default project; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,79 @@ | ||
import { | ||
SubqlCosmosDatasourceKind, | ||
SubqlCosmosHandlerKind, | ||
CosmosProject | ||
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: "akash-starter", | ||
description: | ||
"This project can be use as a starting point for developing your Cosmos Akash based SubQuery project", | ||
runner: { | ||
node: { | ||
name: "@subql/node-cosmos", | ||
version: ">=3.0.0", | ||
}, | ||
query: { | ||
name: "@subql/query", | ||
version: "*", | ||
}, | ||
specVersion: "1.0.0", | ||
version: "0.0.1", | ||
name: "akash-starter", | ||
description: | ||
"This project can be use as a starting point for developing your Cosmos Akash based SubQuery project", | ||
runner: { | ||
node: { | ||
name: "@subql/node-cosmos", | ||
version: ">=3.0.0", | ||
}, | ||
schema: { | ||
file: "./schema.graphql", | ||
query: { | ||
name: "@subql/query", | ||
version: "*", | ||
}, | ||
network: { | ||
/* The genesis hash of the network (hash of block 0) */ | ||
chainId: | ||
"akashnet-2", | ||
/** | ||
* 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://rpc-akash.ecostake.com:443", | ||
"https://rpc.akashnet.net:443" | ||
], | ||
// dictionary: "https://api.subquery.network/sq/subquery/cosmos-sei-dictionary", | ||
chaintypes: new Map([ | ||
[ | ||
"akash.staking.v1beta3", { | ||
file: "./proto/akash/staking/v1beta3/params.proto", | ||
messages: [ | ||
"Params" | ||
] | ||
} | ||
], | ||
]) | ||
}, | ||
dataSources: [ | ||
}, | ||
schema: { | ||
file: "./schema.graphql", | ||
}, | ||
network: { | ||
/* The genesis hash of the network (hash of block 0) */ | ||
chainId: "akashnet-2", | ||
/** | ||
* These endpoint(s) should be non-pruned archive nodes | ||
* Public nodes may be rate limited, which can affect indexing speed | ||
* When developing your project we suggest getting a private API key | ||
* We suggest providing an array of endpoints for increased speed and reliability | ||
*/ | ||
endpoint: [ | ||
"https://rpc-akash.ecostake.com:443", | ||
"https://rpc.akashnet.net:443", | ||
], | ||
// dictionary: "https://api.subquery.network/sq/subquery/cosmos-sei-dictionary", | ||
chaintypes: new Map([ | ||
[ | ||
"akash.staking.v1beta3", | ||
{ | ||
kind: SubqlCosmosDatasourceKind.Runtime, | ||
startBlock: 11364001, | ||
mapping: { | ||
file: './dist/index.js', | ||
handlers: [ | ||
{ | ||
handler: 'handleReward', | ||
kind: SubqlCosmosHandlerKind.Event, | ||
filter: { | ||
type: 'withdraw_rewards', | ||
messageFilter: { | ||
type: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward" | ||
} | ||
/* | ||
file: "./proto/akash/staking/v1beta3/params.proto", | ||
messages: ["Params"], | ||
}, | ||
], | ||
]), | ||
}, | ||
dataSources: [ | ||
{ | ||
kind: SubqlCosmosDatasourceKind.Runtime, | ||
startBlock: 11364001, | ||
mapping: { | ||
file: "./dist/index.js", | ||
handlers: [ | ||
{ | ||
handler: "handleReward", | ||
kind: SubqlCosmosHandlerKind.Event, | ||
filter: { | ||
type: "withdraw_rewards", | ||
messageFilter: { | ||
type: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", | ||
}, | ||
/* | ||
contractCall field can be specified here too | ||
values: # A set of key/value pairs that are present in the message data | ||
contract: "juno1v99ehkuetkpf0yxdry8ce92yeqaeaa7lyxr2aagkesrw67wcsn8qxpxay0" | ||
*/ | ||
} | ||
} | ||
] | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
export default project; | ||
export default project; |
Oops, something went wrong.