Skip to content

Commit

Permalink
fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
dragos-rebegea committed Mar 18, 2024
1 parent e12e20e commit d3893c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helpers/encodeCallData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { numberToPaddedHex } from "@multiversx/sdk-core/out/utils.codec";

const uint32ArgBytes = 8
const uint64ArgBytes = 16

const DataPresentProtocolMarker = "0x01"
/**
* Encodes call data for the deposit function with simplified argument handling.
* Automatically attempts to detect and encode integers and strings.
Expand All @@ -14,7 +14,7 @@ const uint64ArgBytes = 16
* @returns {string} The encoded callData string.
*/
export function encodeCallData(endpointName: string, gasLimit: number, args: any[]): string {
let callData = '0x01';
let callData = DataPresentProtocolMarker;
callData = addEndpointName(callData, endpointName);
callData = addGasLimit(callData, gasLimit);
callData = addArgs(callData, args);
Expand Down

0 comments on commit d3893c1

Please sign in to comment.