Skip to content

Commit

Permalink
t8n console.log dumps [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
jochem-brouwer committed Aug 19, 2024
1 parent b06a54c commit d0a4dfb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/vm/test/t8n/t8n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ const receipts: any = []

let txCounter = 0

let log = true

vm.events.on('afterTx', async (afterTx, continueFn: any) => {
const receipt = afterTx.receipt as PostByzantiumTxReceipt
const pushReceipt = {
Expand All @@ -132,11 +134,24 @@ vm.events.on('afterTx', async (afterTx, continueFn: any) => {
blockHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
transactionIndex: '0x' + txCounter.toString(16),
}
console.log('TX DONE')
log = false
receipts.push(pushReceipt)
txCounter++
continueFn!(undefined)
})

vm.events.on('beforeTx', (e) => {
console.log('!---! NEW TX')
console.log('-------------------------------------------------')
})

vm.evm.events?.on('step', (e) => {
if (log) {
console.log(e.address.toString(), e.opcode.name)
}
})

// Track the allocation to ensure the output.alloc is correct
const allocTracker: {
[address: string]: {
Expand Down

0 comments on commit d0a4dfb

Please sign in to comment.