osmosis-labs / osmosis-rust

Rust libraries for osmosis
Apache License 2.0
59 stars 52 forks source link

feat: Add backtraces feature for cosmwasm-std Errors #80

Closed apollo-sturdy closed 1 year ago

apollo-sturdy commented 1 year ago

cosmwasm-std has a feature backtraces that lets you see which line number an Error came from. This is very useful as otherwise in tests you just get the test line number where you do .unwrap. Unfortunately osmosis-std currently breaks if you try to enable the backtraces feature since osmosis-std-derive tries to create StdError without the backtrace parameter. This PR fixes that. It also fixes some other bugs where the tests did not compile (the tests still fail, but this is also from upstream main, I did not bother to fix them). Lastly it generates types for the Cosmos gov module so that we can use them in osmosis-test-tube instead of relying on cosmrs.