flow-emulator
flow-emulator copied to clipboard
Add interaction logs
Description
- Transaction result can't be returned before new block is commited and all changes done by transaction are calculated and stored. I've added new admin endpoint, which will allow to access logs by transaction id at
/emulator/logs/{txId}
. This will keep Backend in complience with access.API interface and (technically 😅) shouldn't break existing solutions 🤞 - Script result can be returned with HTTP request, so we create new type, which holds all the fields of ScriptResult, add new field
Logs
and then encode it as json
Drawbacks
- gRPC endpoints are not implemented 😬
@sideninja need your advice on how to properly implement/improve this feature 🙇
Closes #223
For contributor use:
- [x] Targeted PR against
master
branch - [x] Linked to GitHub issue with discussion and accepted design OR link to spec that describes this work
- [x] Code follows the standards mentioned here
- [ ] Updated relevant documentation
- [x] Re-reviewed
Files changed
in the GitHub PR explorer - [x] Added appropriate labels