const processor = new SubstrateBatchProcessor()
.setGateway('https://v2.archive.subsquid.io/network/astar-substrate')
.setRpcEndpoint('https://astar-rpc.dwellir.com')
.addEthereumTransaction(\{\})
.addEvmLog(\{\})
processor.run(new TypeormDatabase(), async ctx => {
for (const block of ctx.blocks) {
for (const event of block.events) {
if (event.name === 'EVM.Log') {
// no need to supply any extra data to determine
// the runtime version: event has all necessary references
const \{address, data, topics\} = getEvmLog(event)
// process evm log data
}
}
for (const call of block.calls) {
if (call.name==='Ethereum.transact') {
const txn = getTransaction(call)
// process evm txn data
}
}
}
})