Skip to content

Question: Purpose of claimMessage method in ERC20 class #17

Description

@BrianSeong99

Seeking clarification on why the claimMessage method exists in the ERC20 token class, as it seems conceptually different from token-specific operations.

In src/native/tokens/erc20.ts, there's a claimMessage method:

/**
 * Claim message from bridge transaction hash
 *
 * @param transactionHash - Hash of the bridge transaction on the source network
 * @param sourceNetworkId - Network ID of the source network (where bridge tx happened)
 * @param bridgeIndex - Index of bridge event in transaction (default: 0)
 * @param from - From address for the claim transaction
 */
async claimMessage(
  transactionHash: string,
  sourceNetworkId: number,
  bridgeIndex = 0,
  from?: string
): Promise<TransactionParams> {
  const bridge = this.getBridge();
  return bridge.buildClaimMessageFromHash(
    transactionHash,
    sourceNetworkId,
    bridgeIndex,
    from
  );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions