@instadapp/avocado-base 0.0.21 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instadapp/avocado-base",
3
- "version": "0.0.21",
3
+ "version": "0.0.24",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "global.d.ts",
package/utils/metadata.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ethers, utils } from "ethers";
2
- import { Forwarder__factory } from "@/contracts";
2
+ import { Forwarder__factory } from "../contracts";
3
3
 
4
4
  const multiMetadataTypes = ["bytes[]"];
5
5
 
@@ -238,7 +238,7 @@ export const decodeMetadata = (data: string) => {
238
238
  } else {
239
239
  metadata = executeData.metadata_;
240
240
  }
241
- } else {
241
+ } else if (data.startsWith("0x14f80a8d")) {
242
242
  const executeDataV2 = iface.decodeFunctionData("executeV2", data);
243
243
  if (
244
244
  executeDataV2.params_.metadata === "0x" ||
@@ -248,6 +248,16 @@ export const decodeMetadata = (data: string) => {
248
248
  } else {
249
249
  metadata = executeDataV2.params_.metadata;
250
250
  }
251
+ } else {
252
+ const executeDataV3 = iface.decodeFunctionData("executeV3", data);
253
+ if (
254
+ executeDataV3.params_.metadata === "0x" ||
255
+ !executeDataV3.params_.metadata
256
+ ) {
257
+ return null;
258
+ } else {
259
+ metadata = executeDataV3.params_.metadata;
260
+ }
251
261
  }
252
262
 
253
263
  const metadataArr = [];