GithubHelp home page GithubHelp logo

String decoding breaks about ethereumjs-abi HOT 3 OPEN

ethereumjs avatar ethereumjs commented on June 19, 2024 3
String decoding breaks

from ethereumjs-abi.

Comments (3)

montyanderson avatar montyanderson commented on June 19, 2024

This was actually due to passing in a string to abi.rawDecode and it failing silently.

Possible we should check that the data argument is definitely a buffer?

from ethereumjs-abi.

k06a avatar k06a commented on June 19, 2024

Same problem actual for me:

const inTypes = [
    'address',
    'address',
    'address',
    'address',
    'uint256',
    'uint256',
    'uint256',
    'uint256',
    'uint256',
    'uint256',
    'bytes',
    'bytes',
    '[]',
    'uint256',
    'bytes[]'
];

const input = '0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000006924a03bb710eaf199ab6ac9f2bb148215ae9b5d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a258b39954cef5cb142fd567a46cddb31a67012400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002ce954ae8b5d1cf0000000000000000000000000000000000000000000000036c090d0ca6888000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005d15e7c50000000000000000000000000000000000000000000000000000016b9d8e9ab2000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b000000000000000000000000089d24a6b4ccb1b6faa2625fe562bdd9a23260359000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000421b01fda954331f6f5430d93ab7a884458b4b5259e6ce2127e3c41a6090d10481375023f3c61afb372349ec0ecbd0e476593cce90cc8dbb46cf569875910753705403000000000000000000000000000000000000000000000000000000000000';

abi.rawDecode(inTypes, Buffer.from(input, 'hex'))

from ethereumjs-abi.

k06a avatar k06a commented on June 19, 2024

It seems I wrongly parsed argument types:

marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])

from ethereumjs-abi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.