-
Notifications
You must be signed in to change notification settings - Fork 0
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
Transfer-and-Call, Transfer-Multi-and-Call, Get-Call-Data and other enhancements #12
Conversation
18f428f
to
ec9685c
Compare
@PaulRBerg, curiously enough, there seems to be an issue with the "max line length" parameter of forge's formatter, in which the maximum acceptable length for a code line is considered to be N+1, instead of the N you've submitted as Because of the above, the "same" max line limit for forge's and solhint's formatter was, actually, off by one - and was generating an error during the execution of the I've worked around this by configuring the forge fmt's |
@IaroslavMazur that's a known issue with the Forge formatter: Rather than lowering the formatter's line length to 119, we should instead increase Solhint's |
ec9685c
to
8c7d0cc
Compare
Oh, wow... I did try looking for this issue reported in their repo, and did notice the issue above, but haven't looked deeper into it, because thought that it refers to smth else. 😅 Well done reporting the problem!
Thanks for the idea! Just pushed the new changes. Given how in Solhint, the max line length is a hard requirement, it does make sense to configure it there (i.e. configuring it in Foundry's formatter would only give us unpredictable results). |
8c7d0cc
to
00df50a
Compare
00df50a
to
e49ac92
Compare
TIL: it is perfectly fine for Solidity libraries to have To generate the "callable" bytecode for the Pushed the updates to this PR. cc @PaulRBerg |
73b9f9a
to
df2a78a
Compare
I've realized that given
the This is because in the current design, the EOA calling the The right place for the verification is, therefore, our Rust Precompile. Its Pushed the updates to this PR. cc @PaulRBerg |
249a174
to
c4ce18d
Compare
0acf824
to
520ee94
Compare
fix: send MNTs to a single address, instead of many; fix: make the MNTs sender implicit (i.e. the msg.sender). test: NaiveTokenTransferrerMock refactor: make the token transfer sender (i.e. `address(this)`) implicit refactor: restrict the burning ability to just the token holders; refactor: change the signature of INativeTokens::burn(); refactor: change the type of sub id and token id to uint256; refactor: remove the unused code; chore: format the code in the repo; chore: work around the forge fmt <-> bun solhint max-line conflict.
060666f
to
8d35938
Compare
8d35938
to
348ac36
Compare
463e5ef
to
4a34413
Compare
fix: make NativeTokens::balanceOf() callable by both EOAs and Smart Contracts
Having it also callable by EOAs (i.e. with the `public` modifier) leads to the to-be-linked dependencies/references inserted into the bytecode of the contracts using the Native Tokens library. The latter was not compatible with the testing framework/methodology we use in the SabVM repo.
3a1f512
to
c02dd5c
Compare
8ed1716
to
79b0b53
Compare
79b0b53
to
3000197
Compare
3000197
to
a6598cb
Compare
Ready to be reviewed by you, @PaulRBerg & @smol-ninja 🙌 |
Great work @IaroslavMazur. I am glad that we have been able to pull this off. Given that we've decided to turn this work into an EIP, I will trust that your work is good enough as a PoC, and skip the review. Freel tree to merge this. |
Oh, you're not alone in this feeling! 😃😌🥳 @smol-ninja, would you like to take a look - or do I have the green light to merge the PR? 👀 |
I will have a look at it soon. |
Awesome, thank you! |
f76018d
to
4c891cd
Compare
4c891cd
to
1d7539c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feat: implement contract to test transfer-and-call functionality
feat: infra for testing transfer-multi-and-call
feat: Get Call Data functionality
fix: send MNTs to a single address, instead of many
fix: make the MNTs sender implicit (i.e. the msg.sender)
fix: transfer and call
fix: make NativeTokens::balanceOf() callable by both EOAs and Smart Contracts
test: NaiveTokenTransferrerMock
refactor: make the token transfer sender (i.e.
address(this)
) implicitrefactor: restrict the burning ability to just the token holders
refactor: change the signature of INativeTokens::burn()
refactor: change the type of sub id and token id to uint256
refactor: remove the unused code
chore: format the code in the repo
chore: work around the forge fmt <-> bun solhint max-line conflict