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

Fix #39 incorrect handling of bytesX arguments in solidityPack() #40

Merged
merged 2 commits into from
Mar 9, 2017

Conversation

mjmau
Copy link
Contributor

@mjmau mjmau commented Feb 13, 2017

Before this fix:

abi.solidityPack(
    [ 'bytes32', 'uint32', 'uint32', 'uint32', 'uint32' ],
    [ new Buffer('123456', 'hex'), 6, 7, 8, 9 ]
)
=> 1234560000000000000000000000000000000000000000000000000000000000

After this fix:

abi.solidityPack(
    [ 'bytes32', 'uint32', 'uint32', 'uint32', 'uint32' ],
    [ new Buffer('123456', 'hex'), 6, 7, 8, 9 ]
)
=> 123456000000000000000000000000000000000000000000000000000000000000000006000000070000000800000009

@coveralls
Copy link

Coverage Status

Coverage remained the same at 83.18% when pulling bff8a2b on MichaelMaurer:mjm-solidity-pack-bytes32 into 4a33f23 on ethereumjs:master.

@axic
Copy link
Member

axic commented Mar 9, 2017

Thank your for the fix!

@axic axic merged commit cf8c093 into ethereumjs:master Mar 9, 2017
@mjmau mjmau deleted the mjm-solidity-pack-bytes32 branch April 22, 2017 10:56
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

4 participants