Giter Site home page Giter Site logo

Comments (8)

sebnyc avatar sebnyc commented on September 27, 2024 1

Sure. You can try :

$tr = $eth->eth_getTransactionByHash(new EthD32("0x527e9b670536c09fe160b0c2e33728eadd7f8affae7803049fa8d8ec2d1c7cfe"));
echo $tr->value->val();

I currently outputs -493447593709551616 whereas the expected value is 1122081030000000000.

from ethereum-php.

digitaldonkey avatar digitaldonkey commented on September 27, 2024

Can you provide a example to test against?

from ethereum-php.

sebnyc avatar sebnyc commented on September 27, 2024

@digitaldonkey I'm not sure I understand how the EthQ class is used for RLP decoding, so I don't feel comfortable providing a pull request for this one.
Do you have any hint on how to fix that ?

from ethereum-php.

digitaldonkey avatar digitaldonkey commented on September 27, 2024

My current guess is that the block number is actually not a EthQ as it is not padded as far as I remember.
Looking into it now.

from ethereum-php.

sebnyc avatar sebnyc commented on September 27, 2024

Yes I confirm that the block number is not padded, that's what I see in my tests with my Parity node.
And same thing for many other attributes (transaction value, nonce, gasPrice, gas, gasUsed, block difficulty, gasLimit,...).

from ethereum-php.

digitaldonkey avatar digitaldonkey commented on September 27, 2024

Assuming that data types are implemented consistently was a very naive idea of mine ;)

My approach so far was to use the Library to make them consistent - independently from the actual client.

from ethereum-php.

digitaldonkey avatar digitaldonkey commented on September 27, 2024

Fixed in dev branch.

Deprecated unpadded negative hexadecimal numbers.

from ethereum-php.

sebnyc avatar sebnyc commented on September 27, 2024

@digitaldonkey Nice, thank you !
That should do the trick. Can't wait to test it.

from ethereum-php.

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.