Skip to content

Support CAIP-keyed LiFi contracts + Tron CAIP namespace #203

Description

@mpetrunic

Part of sprintertech/lifi-solver#465. Blocked by sprintertech/solver-config#345 — the LiFi contract fields there become CAIP-keyed maps with an eip155:* wildcard, so the current flat string reads stop compiling.

  • chains/evm/config.go:128-129 copies ProtocolsMetadata.Lifi.OutputSettler / .InputSettlerEscrow straight into per-chain config — resolve per CAIP instead.
  • chains/evm/config.go:79 builds the chain id as fmt.Sprintf("eip155:%d", *c.Id) — hardcoded namespace, needs Tron support (tron:728126428).
  • app/app.go:182-206,309,316 and chains/evm/message/lifiEscrow.go:45,163,173 key LiFi addresses by numeric chain id (map[uint64]common.Address). 728126428 fits, but the values now come from the CAIP-keyed config, so the lookup has to go through the resolver.

Tron addresses in config are the 20-byte hex form, so common.HexToAddress / common.Address keep working here — base58 conversion belongs at the chain boundary, not in signing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions