-
Couldn't load subscription status.
- Fork 1
Handling ssc cost #2
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
base: v0.7-monad-gas-limit
Are you sure you want to change the base?
Conversation
|
|
||
| SenderCreator private immutable _senderCreator = new SenderCreator(); | ||
|
|
||
| ISscOpcodes private immutable _ssc = ISscOpcodes(address(0x665e930982A9a03c844641d453a2C3462ED7Ff41)); |
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.
Deploying bytecode 0x60a2600b5f3960a25ff3fe600734156097565b600d6070565b63e7837508811460435763346527bf8114604c57638315b35381146055576386c3ee6e8114605e5763b7987bb481146067575f5ffd5bd0805f5260205ff35bd1805f5260205ff35bd2805f5260205ff35bd3805f5260205ff35bd4805f5260205ff35b5f7c01000000000000000000000000000000000000000000000000000000005f3504905090565b80609f575f5ffd5b5056 with salt 0x769a9f24a3e8cd02f97cdc25df023d91b7440615a2e6126d91057f41b87cb7b2 using CreateX.deployCreate2
| int256 constant public SSC_STORAGE_SLOT_COST = 12800000000000000; | ||
| int256 constant public SSC_STORAGE_SLOT_REFUND = 12672000000000000; | ||
|
|
||
| int256 constant public SSC_ACCOUNT_COST = 12800000000000000; | ||
| int256 constant public SSC_ACCOUNT_REFUND = 12672000000000000; | ||
|
|
||
| int256 constant public SSC_CODE_CREATED_COST = 12800000000000000; |
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.
Have to set correct values
4ffc61d to
a946b64
Compare
a946b64 to
5628e7f
Compare
| // this can be negative in cases of refunds | ||
| int256 netSSC = _netSSC() - preSSC; | ||
| // In case of negative netSSC msg.value must be higher than abs(netSSC) | ||
| uint256 sscCompensation = uint256(int256(msg.value) + netSSC); |
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.
The conversion would revert the whole bundle here in case of msg.value is smaller than the refund
No description provided.