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)); }