Skip to content

Commit

Permalink
CR dan
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalaji committed Oct 29, 2024
1 parent a73ad6b commit bdb065a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions typescript/sdk/src/core/HyperlaneCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ import { CoreFactories, coreFactories } from './contracts.js';
import { DispatchEvent } from './events.js';
import { DispatchedMessage } from './types.js';

// If no metadata is provided, ensure we provide a default of 0x0001.
// We set to 0x0001 instead of 0x0 to ensure it does not break on zksync.
const DEFAULT_METADATA = '0x0001';

export class HyperlaneCore extends HyperlaneApp<CoreFactories> {
static fromAddressesMap(
addressesMap: HyperlaneAddressesMap<any>,
Expand Down Expand Up @@ -94,7 +98,7 @@ export class HyperlaneCore extends HyperlaneApp<CoreFactories> {
destinationId,
recipient,
body,
metadata || '0x0001',
metadata || DEFAULT_METADATA,
hook || ethers.constants.AddressZero,
);
};
Expand Down Expand Up @@ -159,7 +163,7 @@ export class HyperlaneCore extends HyperlaneApp<CoreFactories> {
destinationDomain,
recipientBytes32,
body,
metadata || '0x0001',
metadata || DEFAULT_METADATA,
hook || ethers.constants.AddressZero,
] as const;

Expand Down

0 comments on commit bdb065a

Please sign in to comment.