-
Notifications
You must be signed in to change notification settings - Fork 20
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
Error: invalid solidity type!: safeuint #2
Comments
Seems to compile ok using the following syntax
ABI
BYTECODE
|
I'll modify the output of ABI from |
If I change the abi after Lity compilation (replace safeuint with uint) I can deploy the contract and then execute its following two functions. function useSafeuint
function c
Issue
|
Just providing some more information here. Passing in plain uint256 and returning uint256 as part of the Solidity code (before compilation) produces the following results. Also passing in just plain uint and returning uint as part of the Solidity code (before compilation) produces the same result (because the compiler turns uint into uint256).
|
Hi @tpmccallum, Thanks for your test script. We already fixed the issue in the bugfix version v1.2.3. Because the function selector in bytecode will use the function prototype to generate function signature which is the first (left, high-order in big-endian) four bytes of the Keccak (SHA-3) hash of the function name and types of parameters. If we only modify the abi output will make the function selector get wrong function and make the execution fail. |
Thank you @hydai I have updated to v1.2.3 and the safeint is now making its way through from the smart contract's source code to the deployed contract's execution. I have a question. For me, I get the number zero, as apposed to an error. Please see details below. If I deploy this contract
I get this abi
and this bytecode
If I deploy this and call the function called "c" I get the following result
I have written a page < https://github.com/CyberMiles/tim-research/blob/master/integer_overflow/integer_overflow.asciidoc > which elaborates on this, and poses a question. Great work! Look forward to exploring this with you. I have a few ideas and am really interested in your view on this. Kind regards |
Oh, I see. We don't put the deployed example for |
I am getting the following error
If I compile and deploy the the contract C and then call its function c as per the example at https://lity.readthedocs.io/en/latest/safeuint.html#example
The text was updated successfully, but these errors were encountered: