/assert-balances

Safety hatch for aborting transactions with unexpected balance changes

Primary LanguageTypeScript

Assert Balances

Build Status

Assert Balances can be used as an additional safety check by wallets and other apps to ensure the outcome of a given transaction is as expected. One can insert into the end of a transaction an instruction that calls this program, asserting that balances are greater than or equal to some expected amount. If a transaction ends up changing balances more than expected, it will abort.

Developing

Build

Anchor is used for developoment, and it's recommended workflow is used here. To get started, see the guide.

anchor build

Run the Test

Run the tests

anchor test