Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MultiSendDecode command to bin.js #1856

Merged
merged 2 commits into from Aug 3, 2022
Merged

Conversation

leomassazza
Copy link
Contributor

@leomassazza leomassazza commented Aug 3, 2022

Adds a command to the bin.js to decode Gnosis multi-send payload.

Usage: ./bin.js decode-multi-send MULTI SEND transactions(bytes)

i.e.

./bin.js decode-multi-send 0x008d203c458d536fe0f97e9f741bc231eac8cd91cf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002425a3746e0000000000000000000000000000000000000000000189ae49790084000000000029c295b046a73cde593f21f63091b072d407e3f200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064e54c1671000000000000000000000000000000000000000000000000000000000000000200000000000000000000000039ea01a0298c315d149a490e34b59dbf2ec7e48f000000000000000000000000000000000000000000009d78ea2fb0b518000000

will result in the following output

[
  {
    index: 1,
    target: '0x8d203c458d536fe0f97e9f741bc231eac8cd91cf',
    operationType: 'Call',
    value: 0,
    decoded: {
      method: {
        name: 'setInflationAmount',
        params: [
          {
            name: 'amount',
            value: '1859105055499999917375488',
            type: 'uint256'
          }
        ]
      },
      contract: 'SupplySchedule'
    }
  },
  {
    index: 1,
    target: '0x29c295b046a73cde593f21f63091b072d407e3f2',
    operationType: 'Call',
    value: 0,
    decoded: {
      method: {
        name: 'editRewardDistribution',
        params: [
          { name: 'index', value: '2', type: 'uint256' },
          {
            name: 'destination',
            value: '0x39ea01a0298c315d149a490e34b59dbf2ec7e48f',
            type: 'address'
          },
          {
            name: 'amount',
            value: '743642022000000063504384',
            type: 'uint256'
          }
        ]
      },
      contract: 'RewardsDistribution'
    }
  }
]

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #1856 (4e742a9) into develop (0cb16b5) will not change coverage.
The diff coverage is n/a.

❗ Current head 4e742a9 differs from pull request most recent head 0d70b44. Consider uploading reports for the commit 0d70b44 to get more accurate results

@@           Coverage Diff            @@
##           develop    #1856   +/-   ##
========================================
  Coverage    94.91%   94.91%           
========================================
  Files          106      106           
  Lines         2634     2634           
  Branches       797      797           
========================================
  Hits          2500     2500           
  Misses         134      134           

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@barrasso barrasso merged commit b116d42 into develop Aug 3, 2022
@barrasso barrasso deleted the add-multisend-decode-to-bin branch August 3, 2022 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants