open-autonomy icon indicating copy to clipboard operation
open-autonomy copied to clipboard

Backport the `ChainType` enum from the middleware to open-autonomy

Open OjusWiZard opened this issue 1 year ago • 0 comments
trafficstars

Is your feature request related to a problem? Please describe. We can not seamlessly use the ChainType enum from open-autonomy in Pearl because of the following reasons:

  • In Pearl, we partially support a different LedgerType and ChainType, i.e. SOLANA
  • In Pearl, we have some more utility methods that are not present in the ChainType enum of open-autonomy

Describe the solution you'd like It would be best to have a complete version of this ChainType enum in open-autonomy and use it in the middleware with a simple import.

  • Either add the partial implementation of SOLANA in open-autonomy, or not (if not then it'll need to be cleaned from Pearl)
  • Add the utility property/methods like ledger_type, from_string, and from_id in the ChainType of open-autonomy

Describe alternatives you've considered For now, a dynamically mutated version of ChainType is used in the middleware. We want to avoid such workarounds.

Additional context Once done, use the updated version of autonomy in the Pearl and remove this TODO and maybe the partial implementation of SOLANA (if we choose to do that)

OjusWiZard avatar Nov 15 '24 15:11 OjusWiZard