Open ndzik opened 3 years ago
Currently this is required:
const tx = await session.mint(nftAddress, nftId); const minttx = tx.tx as Mint;
I think it would be nice to have a polymorphic TxReceipt<T extends Transaction> helper, which types the internal transaction:
TxReceipt<T extends Transaction>
const minttx: TxReceipt<Mint> = await session.mint(nftAddress, nftId);
This can then be set in the return values of our interfaces and should be straight forward to implement.
I like the idea of creating a templated type-safe TxReceipt type. But I think that it is still better to have two separate fields tx for the transaction and deltas for the modified deltas.
TxReceipt
tx
deltas
Currently this is required:
I think it would be nice to have a polymorphic
TxReceipt<T extends Transaction>
helper, which types the internal transaction:This can then be set in the return values of our interfaces and should be straight forward to implement.