wormhole-foundation/example-native-token-transfers

solana: Add missing test cases to test suite

Opened this issue · 1 comments

Cargo tests

  • unregistered peer can't transfer
  • can't transfer to unregistered peer
  • can't transfer more than balance
  • wrong inbox accounts
  • paused contracts

// TODO: some more tests
// - unregistered peer can't transfer
// - can't transfer to unregistered peer
// - can't transfer more than balance
// - wrong inbox accounts
// - paused contracts

Anchor

  • Burn mode testing

// describe('Burning', () => {
// beforeEach(async () => {
// await ntt.initialize({
// payer,
// owner,
// chain: 'solana',
// mint,
// outboundLimit: new BN(1000000),
// mode: 'burning'
// })
// });
// });

  • Quoter calculations and workflow (note the PR indicates that the program is untested) #274

  • #278

  • Test that TransferNotApproved error is returned when trying to redeem a transfer that has not been approved. This is a new error condition introduced by #336

https://github.com/wormhole-foundation/example-native-token-transfers/pull/219/files should probably be merged before further work is done here, as it adds useful functions to help with testing