Dear @fabrice ,
According to the Algorand ABI you can log the result of a contract call.
But then how can you use that result, e.g. when you call a contract from a contract?
There are opcodes that allow reading the logs of inner transaction calls.
(Opcodes - Algorand Developer Portal, with field Logs
)
Thank you very much.
I found the following:
txn f
Opcode: 0x31 {uint8 transaction field index}
Stack: ... › ..., any
field F of current transaction
Index Name Type In Notes
58 Logs []byte v5 Log messages emitted by an application call (only with itxn in v5). Application mode only
59 NumLogs uint64 v5 Number of Logs (only with itxn in v5). Application mode only
62 LastLog []byte v6 The last message emitted. Empty bytes if none were emitted. Application mode only
log
Opcode: 0xb0
Stack: ..., A: []byte › ...
write A to log state of the current application
Availability: v5
Mode: Application
Note: log fails if called more than MaxLogCalls times in a program, or if the sum of logged bytes exceeds 1024 bytes.