feat: codegen for instance & proxy
This commit is contained in:
parent
693e81fdff
commit
9289f456d9
@ -2,7 +2,7 @@ module.exports = {
|
||||
yaml: [
|
||||
{
|
||||
specVersion: '0.0.2',
|
||||
repository: 'https://github.com/Synthetixio/synthetix-subgraph',
|
||||
repository: 'https://github.com/tornadocash/tornado-subgraph',
|
||||
dataSourceKind: 'ethereum/contract',
|
||||
mapping: {
|
||||
kind: 'ethereum/events',
|
||||
|
@ -6,8 +6,9 @@ const Contracts = require('./contracts');
|
||||
module.exports = {
|
||||
createYaml: (env) => {
|
||||
|
||||
const createInstanceBlock = ({ name, startBlocks, address }) => ({
|
||||
const createInstanceBlock = ({ name, network, startBlocks, address }) => ({
|
||||
name,
|
||||
network,
|
||||
mappingFile: '../src/mapping-instance.ts',
|
||||
startBlock: startBlocks.prod,
|
||||
address,
|
||||
@ -16,7 +17,7 @@ module.exports = {
|
||||
abis: [
|
||||
{
|
||||
name: 'Instance',
|
||||
file: '../abis/Instance.json'
|
||||
path: '../abis/Instance.json'
|
||||
}
|
||||
],
|
||||
events: [
|
||||
|
@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
description: 'Instance',
|
||||
schemaFile: './schema.graphql',
|
||||
schemaFile: '../schema.graphql',
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
description: 'Proxy',
|
||||
schemaFile: './schema.graphql',
|
||||
schemaFile: '../schema.graphql',
|
||||
};
|
||||
|
@ -6,6 +6,8 @@
|
||||
"build": "graph build",
|
||||
"yaml:proxy": "node ./create-yaml-file create-yaml -s proxy -e bsc | mustache - mustache/yaml.mustache > subgraphs/proxy-tornado-subgraph.yaml",
|
||||
"yaml:instance": "node ./create-yaml-file create-yaml -s instance -e bsc | mustache - mustache/yaml.mustache > subgraphs/instance-tornado-subgraph.yaml",
|
||||
"codegen:proxy": "yarn yaml:proxy && yarn codegen -- subgraphs/proxy-tornado-subgraph.yaml",
|
||||
"codegen:instance": "yarn yaml:instance && yarn codegen -- subgraphs/instance-tornado-subgraph.yaml",
|
||||
"deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ tornadocash/bsc-tornado-subgraph"
|
||||
},
|
||||
"dependencies": {
|
||||
|
Loading…
Reference in New Issue
Block a user