-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: target shanghai #133
base: main
Are you sure you want to change the base?
Conversation
9d32622
to
d02a50b
Compare
a95cabd
to
38c7499
Compare
Note: only asserting these two tests use shanghai as they are the only ones which have distinct bytecode offset markers in the tests. |
@@ -2,6 +2,7 @@ | |||
out = 'out' | |||
libs = ['lib'] | |||
ffi = true | |||
evm_version = "shanghai" |
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.
Tests are still running in 0.8.15
, wouldn't this need to be 0.8.19
as it is minimum supported solidity version for shanghai
?
Some tests files have fixed pragma set to 0.8.15
and should be easily fixable.
One problem is that huffmate depends on solmate and more precisely do an import:
import { ERC1155Recipient } from "solmate/test/ERC1155.t.sol";
which also have a fixed pragma.
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.
so we need a quick PR in Solmate (I don't think that this is so much work)
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.
Here is the PR for solmate transmissions11/solmate#382
@@ -53,6 +53,7 @@ contract ERC20Test is Test { | |||
|
|||
// Deploy the Mintable ERC20 | |||
address mintableTokenAddress = HuffDeployer.config() | |||
.with_evm_version("shanghai") |
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.
it seems to be the default (src). You want to do this to avoid future issues ?
@@ -70,7 +70,7 @@ | |||
[INITIAL_DOMAIN_SEPARATOR] sstore // [] | |||
|
|||
// Copy the runtime bytecode with constructor argument concatenated. | |||
0x67 // [offset] - constructor code size | |||
0x66 // [offset] - constructor code size |
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.
0x66 // [offset] - constructor code size | |
__codesize(CONSTRUCTOR) // [offset] - constructor code size |
still not perfect but better than hardcoded
@@ -2,6 +2,7 @@ | |||
out = 'out' | |||
libs = ['lib'] | |||
ffi = true | |||
evm_version = "shanghai" |
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.
so we need a quick PR in Solmate (I don't think that this is so much work)
Updates huffmate to support shanghai (mainly push0)
This will fix master after the 0.3.2 release