Skip to content

Conversation

EGreg
Copy link

@EGreg EGreg commented Nov 29, 2022

The current web3.php was mysteriously returning numbers like this: 70706864786e6862 instead of the full hex from numbers like 70706864786e6862000000000000000000000000000000000000000000000026. It happens only in the edge case where the hex has a single 'e' in it. These changes fix that scenario.

If you're wondering how we found this out, we ran into an edge case with tokenIds in our NFT Smart Contract when we started generating token IDs of the form seriesId + autoIndex. It just so happened that our seriesId had a single e in it. And PHP's is_numeric interprets numbers of the form '123e456' to be decimal representations of large numbers!

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.

1 participant