Skip to content

Commit

Permalink
fix: abi generation for abis
Browse files Browse the repository at this point in the history
  • Loading branch information
saihaj committed Mar 4, 2024
1 parent c8c02d4 commit ee351c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/cli/src/compiler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ export default class Compiler {
fs.copyFileSync(schemaFilePath, targetFile);
return path.relative(this.options.outputDir, targetFile);
});
compilerDebug('Has ABIs: %s', protocol.hasABIs());

// Copy data source files and update their paths
subgraph = subgraph.update('dataSources', (dataSources: any[]) =>
Expand Down
6 changes: 6 additions & 0 deletions packages/cli/src/protocols/dataset/manifest.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,15 @@ type DatasetSource {
dataset: String!
}

type ContractAbi {
name: String!
file: File!
}

type DatasetMapping {
kind: String!
apiVersion: String!
file: File!
handler: String!
abis: [ContractAbi!]!
}
2 changes: 1 addition & 1 deletion packages/cli/src/protocols/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ const substreamsProtocol: ProtocolConfig = {

const datasetProtocol: ProtocolConfig = {
displayName: 'Dataset',
abi: undefined,
abi: EthereumABI,
contract: undefined,
getTypeGenerator: undefined,
getTemplateCodeGen: undefined,
Expand Down

0 comments on commit ee351c6

Please sign in to comment.