Skip to content

0228

Naming style and abbr#

String Operation Capability#

Logs#

  • runtime.executeTx -> ctx.processTransactions -> runtime.run -> interpreter.execute -> interpreter.executeWithResult -> parser -> opcode-list.ts:Operator(Len | Add | Sub ...)
  • LION 刚才看了 Algob 的源代码。我明白为啥执行的这么快了,他们完全用 JS 重写了一遍 TEAL 的执行器。 runtime.executeTx -> ctx.processTransactions -> runtime.run -> interpreter.execute -> interpreter.executeWithResult -> parser -> opcode-list.ts:Operator(Len | Add | Sub ...) 具体执行器的代码在这: packages/runtime/src/interpreter/opcode-list.ts
  • Another line of logs from /algo-builder/packages/runtime/test/src/interpreter/inner-transaction.ts:1156: interpreter.runtime.getTxReceipt().logs
  • In algob,receipt.gas is actually the Cost of the AppCall
  • (?\<!console).log(?!ic)
  • WRONG: // seems only deploying call have logs, from: Algob Docs
  • Failing Issue... Didn't write the PyTeal code
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
Hi team, thanks for bringing a good product to us.

I was trying to use the `logs` function and I saw a `logs` many times.

- In `types`
  https://github.com/scale-it/algo-builder/blob/40b502658adcc88580844921b3dc933f099b89fd/packages/runtime/src/types.ts#L72-L77
- In `opcode-list`
  https://github.com/scale-it/algo-builder/blob/40b502658adcc88580844921b3dc933f099b89fd/packages/runtime/src/interpreter/opcode-list.ts#L4235

And I searched all repo with `/(?<!console)\.log(?!ic)/g`. In your test this is working.

https://github.com/scale-it/algo-builder/blob/40b502658adcc88580844921b3dc933f099b89fd/packages/runtime/test/src/interpreter/inner-transaction.ts#L1158-L1160

However I couldn't read it from the transaction receipt from mocha test with `let rct = runtime.executeTx(callAppParams); rct.logs;` ( in PyTeal I used it). Nor can I use the `deployer` in mocha test like said in [logs - docs](https://algobuilder.dev/guide/logs.html). (tried runtime, not working).

Is this functionality implemented in the production version?