open-autonomy
open-autonomy copied to clipboard
Backport the `ChainType` enum from the middleware to open-autonomy
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
LedgerTypeandChainType, i.e.SOLANA - In Pearl, we have some more utility methods that are not present in the
ChainTypeenum 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
SOLANAin 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, andfrom_idin theChainTypeof 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)