You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am quite sure we never use Debug outside of test code.
We already have a custom Display implementation which uses base64, which might escape into some contract APIs.
I would not change display, only a Debug implementation which is just for unit tests.
When debugging message calls, I get hard to read output like:
Execute { contract_addr: "Contract #1", msg: Binary([123, 34, 101, 120, 101, 99, 117, 116, 101, 34, 58, 123, 34, 99, 111, 110, 116, 114, 97, 99, 116, 95, 97, 100, 100, 114, 34, 58, 34, 67, 111, 110, 116, 114, 97, 99, 116, 32, 35, 50, 34, 44, 34, 109, 115, 103, 34, 58, 34, 101, 51, 48, 61, 34, 44, 34, 102, 117, 110, 100, 115, 34, 58, 91, 93, 125, 125]), funds: [] }
This is the
Debug
encoding ofBinary
and it should be improved from default. I have two ideas:0x
and hex-encode (as 1)Approach 2 is not very stable for any APIs you would depend on, but debug is only meant for test output for developers, so let's make this nice.
The text was updated successfully, but these errors were encountered: