denotify-client 1.1.31 → 1.1.32
Sign up to get free protection for your applications and to get access to all the features.
package/dist/denotify-client.mjs
CHANGED
@@ -10913,7 +10913,7 @@ class Ft {
|
|
10913
10913
|
if (!o)
|
10914
10914
|
throw new Error("function not in ABI");
|
10915
10915
|
return o.outputs.map((a, c) => ({
|
10916
|
-
source: `function:${s.function}:${
|
10916
|
+
source: `function:${s.function}:${c}`,
|
10917
10917
|
name: a.name,
|
10918
10918
|
type: a.type,
|
10919
10919
|
key: `func_${i}_ret_${c}`,
|
@@ -10925,11 +10925,15 @@ class Ft {
|
|
10925
10925
|
);
|
10926
10926
|
}
|
10927
10927
|
async addFunction(e, t, r, s, i) {
|
10928
|
-
|
10929
|
-
|
10930
|
-
|
10928
|
+
const o = s.find((c) => c.name === t);
|
10929
|
+
if (!o)
|
10930
|
+
throw new Error("function not in ABI");
|
10931
|
+
if (o.type !== "function")
|
10932
|
+
throw new Error(`${o.name} is not a function, it has type ${o.type}`);
|
10933
|
+
const a = new nh(e, s);
|
10934
|
+
return a.interface.encodeFunctionData(t, r), i = i || await this.getAbiHash(s), this.data.push({
|
10931
10935
|
address: e,
|
10932
|
-
bytecode:
|
10936
|
+
bytecode: a.interface.encodeFunctionData(t, r),
|
10933
10937
|
abiHash: i,
|
10934
10938
|
function: t
|
10935
10939
|
}), this;
|