From 64d17f63a9e77ed9cd2c8f39346a41e4ca91447b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Tue, 19 Sep 2023 14:18:55 +0300 Subject: [PATCH 1/2] Allow "func" to be a simple string. --- src/smartcontracts/interface.ts | 1 - src/smartcontracts/transactionPayloadBuilders.ts | 2 +- src/testutils/mockProvider.ts | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/smartcontracts/interface.ts b/src/smartcontracts/interface.ts index 2aa1815a..08e46232 100644 --- a/src/smartcontracts/interface.ts +++ b/src/smartcontracts/interface.ts @@ -93,6 +93,5 @@ export interface ICodeMetadata { } export interface IContractFunction { - name: string; toString(): string; } diff --git a/src/smartcontracts/transactionPayloadBuilders.ts b/src/smartcontracts/transactionPayloadBuilders.ts index f1bf9b37..84c82542 100644 --- a/src/smartcontracts/transactionPayloadBuilders.ts +++ b/src/smartcontracts/transactionPayloadBuilders.ts @@ -154,7 +154,7 @@ export class ContractCallPayloadBuilder { build(): TransactionPayload { guardValueIsSet("calledFunction", this.contractFunction); - let data = this.contractFunction!.name; + let data = this.contractFunction!.toString(); data = appendArgumentsToString(data, this.arguments); return new TransactionPayload(data); diff --git a/src/testutils/mockProvider.ts b/src/testutils/mockProvider.ts index f9808b4f..884ca649 100644 --- a/src/testutils/mockProvider.ts +++ b/src/testutils/mockProvider.ts @@ -58,7 +58,7 @@ export class MockProvider { } mockQueryContractOnFunction(functionName: string, response: IContractQueryResponse) { - let predicate = (query: Query) => query.func.name == functionName; + let predicate = (query: Query) => query.func.toString() == functionName; this.queryContractResponders.push(new QueryContractResponder(predicate, response)); } From 0236f2eb8bcb84ad4c0b46d7ecbe6f3e3081fcbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Tue, 19 Sep 2023 14:20:20 +0300 Subject: [PATCH 2/2] Bump version. --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8dc0e08b..663fbd3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@multiversx/sdk-core", - "version": "12.8.1", + "version": "12.9.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@multiversx/sdk-core", - "version": "12.8.1", + "version": "12.9.0", "license": "MIT", "dependencies": { "@multiversx/sdk-transaction-decoder": "1.0.2", diff --git a/package.json b/package.json index 842db7cc..78f7b2f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-core", - "version": "12.8.1", + "version": "12.9.0", "description": "MultiversX SDK for JavaScript and TypeScript", "main": "out/index.js", "types": "out/index.d.js",