A proposal to manage tokens by the user’s smart contract wallet, which provides a new way to manage assets, utilizes the programmability of the smart contract wallet, and also provides more playability.
Simple token forward compatibility with ERC-20(SNRC-2) means that all fungible tokens can be compatible with this proposal
EOA wallet has no state and code storage, and the Starkent smart contract wallet is different.
The smart contract wallet allows the user’s own account to have state and code, bringing programmability to the wallet. We think there are more directions to expand. For example, token asset management, functional expansion of token transactions, etc.
The proposal aims to achieve the following goals:
- Assets are allocated and managed by the wallet itself, such as approve and allowance, which are configured by the user’s contract wallet, rather than controlled by the token asset contract, to avoid some existing ERC-20 contract risks.
- Add the tokenTransfer function, the transaction initiated by the non-smart wallet itself or will verify the allowance amount
- Add tokenApprove, tokenAllowance, tokenApproveForAll, tokenIsApproveForAll functions. The user wallet itself supports approve function for single token assets and all token assets.
- user wallet can choose batch approve and batch transfer.
- Users can choose to add hook function before and after their tokenTransfer to increase the user’s more playability
- The user can choose to implement the tokenReceive function