Skip to main content
Version: 1.15.0

Function: normalizeRemoteAddress()

normalizeRemoteAddress(s: string): string

Defined in: cct/canton/token-pool/shared.ts:455

Normalize an address for on-ledger storage in a pool's remote chain config: strip an optional 0x prefix and left-pad to 32 bytes (throws on anything over 32 bytes or non-hex). Canonical form is 32-byte-padded bare hex: inbound executes compare the stored value verbatim against the message's 32-byte-padded sourcePoolAddress/sourceTokenAddress, while outbound sends strip the padding again for sub-32-byte destination chains (validateDestChainAddress).

Parameters​

ParameterType
sstring

Returns​

string