Skip to content
This repository was archived by the owner on Oct 10, 2024. It is now read-only.

Commit da3ac9d

Browse files
authored
Merge pull request #497 from tokencard/remove-max-parseInt-check
Remove revert (num > 2^54) statement from parseIntScientific
2 parents a8fac03 + e2b96e9 commit da3ac9d

File tree

13 files changed

+29
-30
lines changed

13 files changed

+29
-30
lines changed

build/internals/parseIntScientific/ParseIntScientific.bin

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/internals/parseIntScientific/combined.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/mocks/parseIntScientificExporter/ParseIntScientific.bin

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/mocks/parseIntScientificExporter/ParseIntScientificExporter.bin

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/mocks/parseIntScientificExporter/combined.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/oracle/Oracle.bin

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/oracle/ParseIntScientific.bin

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/oracle/combined.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/internals/parseIntScientific.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ contract ParseIntScientific {
3333
byte constant private _NINE_ASCII = byte(uint8(57)); //decimal value of '9'
3434
byte constant private _E_ASCII = byte(uint8(69)); //decimal value of 'E'
3535
byte constant private _LOWERCASE_E_ASCII = byte(uint8(101)); //decimal value of 'e'
36-
uint constant private _MAX_PARSED_UINT = 2**54; //max value returned in JSON format above which interoperability issues may be raised
3736

3837
/// @notice ParseIntScientific delegates the call to _parseIntScientific(string, uint) with the 2nd argument being 0.
3938
function _parseIntScientific(string memory _inString) internal pure returns (uint) {
@@ -163,7 +162,6 @@ contract ParseIntScientific {
163162
mint = mint.mul(10 ** (_magnitudeMult));
164163
mint = mint.add(mintDec);
165164
}
166-
require(mint < _MAX_PARSED_UINT, "number exceeded maximum allowed value for safe json decoding");
167165
return mint;
168166
}
169167
}

pkg/bindings/internals/parseIntScientific.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)