Skip to content

[General] <BootLoader smart contract> #912

Discussion options

You must be logged in to vote

My question is, if the code is not physically deployed, then how is it being executed?

It's basically a part of the execution environment, rather than a contract.

To be more specific, let's say I have the following line of code in my smart contract on Zksync
if (msg.sender != BOOTLOADER_FORMAL_ADDRESS)

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…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@sumit03guha
Comment options

@sumit03guha
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by sarahschwartz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
general General question
2 participants