Complete the code to check if the sender is the owner using require.
require(msg.sender [1] owner, "Not owner");
The require statement checks if msg.sender is equal to owner. If not, it stops execution with the message "Not owner".
Complete the code to revert the transaction with a message if the balance is insufficient.
if (balance < amount) [1]("Insufficient balance");
The revert statement stops execution and reverts all changes with the given message.
Fix the error in the assert statement to check that totalSupply is not zero.
assert([1] != 0);
The assert checks that totalSupply is not zero, ensuring the contract state is valid.
Fill both blanks to create a require statement that checks if amount is greater than zero.
require(amount [1] 0, "Amount must be positive"); assert(amount [2] 0);
Both require and assert check that amount is greater than zero to ensure valid input.
Fill all three blanks to create a revert statement inside an if block that checks if sender is not owner.
if (msg.sender [1] owner) { [2]("Unauthorized"); [3]; }
The code checks if msg.sender is not the owner. If true, it reverts with "Unauthorized" and returns to stop execution.