node icon indicating copy to clipboard operation
node copied to clipboard

Setup table to map chain IDs with supported functionalites

Open lumtis opened this issue 1 year ago • 0 comments

Describe the Issue

CCTX types supported varies around chains:

  • EVM chains generally supports everything
  • Bitcoin only support native token, no smart contract call
  • Solana and Ton will only support native token at the beginning, might support smart contract call before Bitcoin
  • Cosmos might support native and fungible token but not smart contract calls

We should setup list of the different functionality and a table mapping the chain ID with list of supported functionalities.

enum CCTXFunctionalities
- nativeDepositWithdraw // should be supported for all
- nativeDepositAndCall // generally supported for all, might not be if memo not supported for example
- nativeWithdrawAndCall
- fungible // erc20, SPL, BRC20
- noAssetCal
- ....l
ethereum:
- nativeDepositWithdraw
- ...
bitcoin:
- nativeDepositWithdraw
  • The table is stored as a state variable and can be updated with an admin message

  • The table is read at a central place in the CCTX processor and eventually prevent CCTX to be processed

lumtis avatar Aug 20 '24 08:08 lumtis