Skip to content

Commit 03b4221

Browse files
author
ScottyPoi
committed
improve log output
1 parent 8bb61dc commit 03b4221

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/evm/examples/clz.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ const runCase = async (evm: EVM, x: PrefixedHexString) => {
4545

4646
const [top] = stack.peek(1)
4747
const hexValue = `0x${top.toString(16)}`
48-
console.log(`clz=${top} (hex=${hexValue}) for x=${x}`)
48+
const gas = res.executionGasUsed
49+
console.log(`input=${x}`)
50+
console.log(`output=${hexValue} -- clz=${top} -- gas=${gas}`)
4951
}
5052

5153
const main = async () => {

0 commit comments

Comments
 (0)