You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deployment/docs/implementing-adapters.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -167,6 +167,14 @@ func (a *MyChainAdapter) DeriveTokenPoolCounterpart(e Environment, chainSelector
167
167
}
168
168
```
169
169
170
+
#### AddressNormalizer (config and datastore addresses)
171
+
172
+
Some changesets normalize user-supplied address strings before datastore lookups. That logic lives on **`deploy.AddressNormalizer`** in **`deployment/deploy`**, registered on **`deploy.GetAddressNormalizerRegistry()`** and keyed **only by chain family** (not by token adapter semver).
173
+
174
+
- Implement the interface in **`chains/<family>/deployment/v1_0_0/adapters/address_normalizer.go`** (see EVM and Solana in this repo).
175
+
- Register once from that package’s **`init()`** with **`deploy.GetAddressNormalizerRegistry().RegisterAddressNormalizer(chain_selectors.Family..., &MyAddressNormalizer{})`** (first registration wins).
176
+
- Optionally embed the normalizer on your **`TokenAdapter`** so the type still satisfies **`AddressNormalizer`** when useful; cross-package callers that only have a chain selector should use the family-keyed registry (as **`deployment/tokens`** does via **`chain_selectors.GetSelectorFamily`**).
e.Logger.Warnf("failed to resolve remote token ref %s: %v. Will attempt to derive remote token address from pool reference", datastore_utils.SprintRef(*inCfg.RemoteToken), err)
return cldf.ChangesetOutput{}, fmt.Errorf("migration[%d]: adapter for family '%s' version '%s' does not support liquidity migration", i, family, migration.NewPoolRef.Version)
0 commit comments