@gearbox-protocol/deploy-tools 5.16.4 → 5.16.5

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.
Files changed (2) hide show
  1. package/dist/index.mjs +42 -11
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -394030,7 +394030,46 @@ function normalizeTimelockTx(t) {
394030
394030
  };
394031
394031
  }
394032
394032
  function normalizeSafeApiBatch(tx) {
394033
- const transactions = tx.dataDecoded.parameters[0].valueDecoded.map((t) => ({
394033
+ const transactions = tx.dataDecoded.parameters[0].valueDecoded.map(normalizeMultisendTransactionDecoded);
394034
+ return {
394035
+ id: tx.safeTxHash,
394036
+ safeTxHash: tx.safeTxHash,
394037
+ description: "",
394038
+ // TODO
394039
+ transactions: normalizeTransactions({ transactions }),
394040
+ type: "governor"
394041
+ // TODO: determine, or wait till they are made the same in deploy-v3
394042
+ };
394043
+ }
394044
+ function normalizeMultisendTransactionDecoded(t) {
394045
+ if (!t.dataDecoded) {
394046
+ try {
394047
+ const { args, functionName } = decodeFunctionData({
394048
+ abi: iGovernorAbi,
394049
+ data: t.data
394050
+ });
394051
+ const funcAbi = getAbiItem({
394052
+ abi: iGovernorAbi,
394053
+ name: functionName
394054
+ });
394055
+ return {
394056
+ to: t.to,
394057
+ value: t.value,
394058
+ contractMethod: {
394059
+ name: functionName,
394060
+ inputs: funcAbi.inputs.map((i) => ({
394061
+ name: i.name,
394062
+ type: i.type
394063
+ })),
394064
+ payable: false
394065
+ },
394066
+ contractInputsValues: Object.fromEntries(args.map((v, i) => [funcAbi.inputs[i].name, v]))
394067
+ };
394068
+ } catch (e) {
394069
+ throw new Error(`multisend tx has no dataDecoded and is not a governor tx: ${e}`);
394070
+ }
394071
+ }
394072
+ return {
394034
394073
  to: t.to,
394035
394074
  value: t.value,
394036
394075
  contractMethod: {
@@ -394042,15 +394081,6 @@ function normalizeSafeApiBatch(tx) {
394042
394081
  payable: false
394043
394082
  },
394044
394083
  contractInputsValues: Object.fromEntries(t.dataDecoded.parameters.map((p) => [p.name, p.value]))
394045
- }));
394046
- return {
394047
- id: tx.safeTxHash,
394048
- safeTxHash: tx.safeTxHash,
394049
- description: "",
394050
- // TODO
394051
- transactions: normalizeTransactions({ transactions }),
394052
- type: "governor"
394053
- // TODO: determine, or wait till they are made the same in deploy-v3
394054
394084
  };
394055
394085
  }
394056
394086
 
@@ -410165,6 +410195,7 @@ var UpdateParser = class extends ProviderBase {
410165
410195
  const parsed = await this.#parseNormalizedBatch(normalizeSafeApiBatch(txs[i]), i, total);
410166
410196
  this.#output.batches.push(parsed);
410167
410197
  } catch (e) {
410198
+ this.logger.error(e, `error parsing batch ${i}`);
410168
410199
  this.#output.batches.push({
410169
410200
  id: txs[i].safeTxHash,
410170
410201
  error: `${e}`.replaceAll("\n", "\\n")
@@ -411965,7 +411996,7 @@ function getRenderer(opts) {
411965
411996
  var package_default = {
411966
411997
  name: "@gearbox-protocol/deploy-tools",
411967
411998
  description: "Gearbox deploy tools",
411968
- version: "5.16.4",
411999
+ version: "5.16.5",
411969
412000
  homepage: "https://gearbox.fi",
411970
412001
  keywords: [
411971
412002
  "gearbox"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/deploy-tools",
3
3
  "description": "Gearbox deploy tools",
4
- "version": "5.16.4",
4
+ "version": "5.16.5",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"