perun-network / erdstall-ts-sdk

TypeScript client SDK to interact with Erdstall.
Apache License 2.0
5 stars 2 forks source link

Expose on-chain `WithdrawalException` event on Erdstall Client API #116

Open sebastianst opened 3 years ago

sebastianst commented 3 years ago

If an individual asset's withdrawal throws during a withdraw on-chain call, the Erdstall smart contract doesn't revert the whole transaction, but just throws a WithdrawalException for this particular asset. This is a safety mechanism to avoid a single token from reverting other token withdrawals indefinitely.

This event still needs to be exposed on the Erdstall client API.

When testing this, the RevertToken from can be used to trigger a revert during a withdrawal.