-
Notifications
You must be signed in to change notification settings - Fork 3
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
Or 1535 thanos cannon update for predeploy contracts #132
Or 1535 thanos cannon update for predeploy contracts #132
Conversation
Hello! @nguyenzung In my opinion, since the deployment address of SignatureChecker is included during the deployment of FiatTokenV2_2.sol(it can be checked in foundry.toml), it seems we should deploy SignatureChecker as well. Thank you😊 |
@nguyenzung |
Thank you! Let me roll it back. Anw, I am curious about why we should deploy a lib if it contains public or external functions |
Thank you very much, Steven I can start devnet, but when I looked at the PR about USDC, I found that there are things need to be checked more. I am doing it in this PR |
https://eip2535diamonds.substack.com/p/the-difference-between-solidity-libraries I will send you a link for reference !! I don’t know if there will be an answer..!🥹 @nguyenzung |
@@ -68,6 +69,13 @@ func BuildL2Genesis(config *DeployConfig, l1StartBlock *types.Block) (*core.Gene | |||
db.CreateAccount(codeAddr) | |||
db.SetState(addr, ImplementationSlot, eth.AddressAsLeftPaddedHash(codeAddr)) | |||
log.Info("Set proxy", "name", name, "address", addr, "implementation", codeAddr) | |||
|
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.
You've catched this points! You are so great. Thank you very much. 🙇🏼♂️
FiatTokenV2 use the
Line 48 in 79ee692
/** |
How about adding the variable for slot in here ?
ImplementationSlot = common.HexToHash("0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc") |
ImplementationSlotForZepplin
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.
Thank you very much, Steven
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.
Let me create a variable
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.
I updated!
op-chain-ops/genesis/setters.go
Outdated
case predeploys.FiatTokenV2_2Addr: | ||
db.SetCode(addr, fiatTokenProxyBytecode) | ||
db.SetState(addr, common.HexToHash("0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b"), eth.AddressAsLeftPaddedHash(proxyAdminAddr)) |
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.
I think we can add variable as well!
AdminSlotForZepplin
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.
I updated
storage["MasterMinter"] = state.StorageValues{ | ||
"_owner": config.MasterMinterOwner, | ||
"controllers": map[any]any{ | ||
"_controller": predeploys.L2UsdcBridgeAddr, | ||
"_worker": predeploys.L2UsdcBridgeAddr, | ||
predeploys.L2UsdcBridgeAddr: predeploys.L2UsdcBridgeAddr, |
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.
Line 70 in 79ee692
function configureController(address _controller, address _worker) |
Great. Thank you very much, Brave,,,🙇🏼♂️😍🥰
Oh, I'm sorry. I have a question! 🙇🏼♂️ |
I think we need to view in assembly to verify it. Let me check |
Thank you very much,,,🙇🏻♂️🥰🫡 |
Thank you so much😊 |
If you delete forge-artifacts and build again, I think you can see the changes. |
I cloned a new main and ran make bindings-build, but the file does not change..! OR-1535-thanos-cannon-update-for-predeploy-contracts as well @rlgns98kr |
@xxeonge |
It seems like the change does not have any meaning. Line 0x11EC and 0x11ED are located between 2 STOP instructions, and those line does not change storage slot or does not return anything. Maybe the change related to compile config |
I tested by debugging, but it seems not run as what described in the article. When we deploy a contract that using lib with external function, there is one transaction. Can we have one transaction for deploying 2 addresses? Anw, the code was rolled back. I think it is good for now |
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.
Thank you very much, Brave! 🥰
Test: you can replace "http://localhost:9545" to your L2_RPC
decimal(): curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x4200000000000000000000000000000000000778","data":"0x313ce567"}, "latest"],"id":1}' http://localhost:9545
admin(): curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x4200000000000000000000000000000000000778","data":"0xf851a440"}, "latest"],"id":1}' http://localhost:9545
implementation(): curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x4200000000000000000000000000000000000778","data":"0x5c60da1b"}, "latest"],"id":1}' http://localhost:9545
admin(): curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x4200000000000000000000000000000000000775","data":"0xf851a440"}, "latest"],"id":1}' http://localhost:9545
implementation(): curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x4200000000000000000000000000000000000775","data":"0x5c60da1b"}, "latest"],"id":1}' http://localhost:9545
messenger(): curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x4200000000000000000000000000000000000775","data":"0x3cb747bf"}, "latest"],"id":1}' http://localhost:9545
l1Usdc(): curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x4200000000000000000000000000000000000775","data":"0x56c3b587"}, "latest"],"id":1}' http://localhost:9545
l2Usdc(): curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x4200000000000000000000000000000000000775","data":"0xa1b4bc04"}, "latest"],"id":1}' http://localhost:9545
getWorker(address): curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x4200000000000000000000000000000000000777","data":"0xc011b1c30000000000000000000000004200000000000000000000000000000000000775"}, "latest"],"id":1}' http://localhost:9545
Thank you very much!