warp-contracts / warp

An implementation of the Arweave SmartWeave smart contracts protocol.
MIT License
159 stars 44 forks source link

fix: prevent wrapping contract Error #231

Closed noomly closed 1 year ago

noomly commented 2 years ago

Expose the actual contract error object for Rust contracts. This allows for precise contract error checking. See https://github.com/pianity/pianity-smartcontracts-next/blob/36ba4b8eb37f14f3f71ac8596094b61d2a30bebd/tests/src/fee.test.ts#L144 for a simple example of what it enables.

Note: it throws the exact error object that was returned by the contract. Not sure if we'd want to wrap it into a custom Error object?

ppedziwiatr commented 1 year ago

I believe this one has been fixed by the @rpiszczatowski