[General] <BootLoader smart contract> #912
-
Team or ProjectNo response EnvironmentMainnet L2 block numberNo response Provide a brief description of the functionality you're trying to implement and the issue you are running into.In the system-contracts Can anyone help me understand this? Repo Link (Optional)No response Additional DetailsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @sumit03guha, great question! I would refer you to this section in our docs:
|
Beta Was this translation helpful? Give feedback.
-
It's basically a part of the execution environment, rather than a contract.
Afaik the You can see an example of what that looks like in this tutorial. The smart account uses a modifier onlyBootloader() {
require(
msg.sender == BOOTLOADER_FORMAL_ADDRESS,
"Only bootloader can call this function"
);
// Continue execution if called from the bootloader.
_;
} |
Beta Was this translation helpful? Give feedback.
It's basically a part of the execution environment, rather than a contract.
Afaik the
msg.sender
would never be the bootloader address in a normal smart contract. The only cases this would apply to are smart account contracts and paymaster contracts, which have functions that need to only be able to be called by the execution environment.You can see an example of what that looks like in this tutorial. The smart account uses a
onlyBootloader
modifier to make su…