@graphprotocol/graph-cli
Version:
CLI for building for and deploying to The Graph
23 lines (22 loc) • 636 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mapping = exports.source = void 0;
const source = ({ contract, startBlock, }) => `
address: '${contract}'
startBlock: ${startBlock}`;
exports.source = source;
const mapping = ({ entities, contractName, }) => `
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ExampleEntity
handlers:
${entities
.map(entity => `
- handler: handle${entity}
entity: ${entity}`)
.join(' ')}
file: ./src/${contractName}.ts
`;
exports.mapping = mapping;