neo-one
neo-one copied to clipboard
Finalize `@receive` decorator and how contracts receive assets
The receive decorator did a lot of work behind the scenes with native assets, especially with allowing a way for callers of the contract method to get their assets back if the invocation failed. How are we to handle that kind of thing now? Need to look at documentation to understand exactly what the receive decorator was doing and how to implement that now.
My notes:
- How to deal with receiving assets in a contract method? Would you just look in Blockchain.currentTransaction? What would you need to do if a method was receiving transfers?
- Change how receive decorator is compiled and how it helps the user check for fund transfers. Check invocation counter like in CS contract
Make sure to update tests, docs, and client types with this.
This includes changing some types in client-common/src/types.ts
- specifically need to update or remove the InvokeSendUnsafeReceiveTransactionOptions
, InvokeSendUnsafeTransactionOptions
, and InvokeReceiveTransactionOptions
. And should sendTo
and sendFrom
be included in TransactionOptions
interface?
Make sure the generated client API for mintTokens
functions includes the correct types for sendTo