You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the unit test for "SafeMath" contract truffle --network solana test ./test/utils/math/SafeMath.test.js
Actual result:
Error message
Contract: SafeMath
with default revert message
add
reverts on addition overflow:
Wrong kind of exception received
+ expected - actual
-invalid literal for int() with base 16: ''
+revert
Expected result:
Test passed successfully.
Additional info:
OpenZeppelin test: Contract: ERC20FlashMint flashLoan.more than maxFlashLoan
it ('more than maxFlashLoan', async function () {
const receiver = await ERC3156FlashBorrowerMock.new(true, true);
const data = this.token.contract.methods.transfer(other, 10).encodeABI();
// _mint overflow reverts using a panic code. No reason string.
await expectRevert.unspecified(this.token.flashLoan(receiver.address, this.token.address, MAX_UINT256, data));
});
The revert result can be returned through different solidity ways. In any case, the first 4 bytes contain a selector, which identifies the method used to encode the result. Some possible values:
Impact:
Proxy + Neon EVM <-> OpenZeppelin library compatibility
Safe math operations computation
STR:
Other changes neonlabsorg/neon-evm#219
truffle --network solana test ./test/utils/math/SafeMath.test.js
Actual result:
Error message
Expected result:
Test passed successfully.
Additional info:
OpenZeppelin test: Contract: ERC20FlashMint flashLoan.more than maxFlashLoan
The revert result can be returned through different solidity ways. In any case, the first 4 bytes contain a selector, which identifies the method used to encode the result. Some possible values:
We should analyze the selector before parse followed data:
https://github.com/neonlabsorg/proxy-model.py/blob/5cb42d5e7f951338e787f669e96512499b081a89/proxy/plugin/solana_rest_api_tools.py#L363-L371
See also:
The text was updated successfully, but these errors were encountered: