Complete the code to get the address of the immediate caller.
address caller = [1];msg.sender is the address of the immediate caller of the function, which is what you want here.
Complete the code to get the original external account that started the transaction.
address origin = [1];tx.origin is the original external account that started the transaction, even through multiple calls.
Fix the error in the require statement to check the immediate caller is the owner.
require([1] == owner, "Not owner");
You should use msg.sender to check the immediate caller, not tx.origin.
Fill both blanks to create a function that returns the original transaction sender and the immediate caller.
function getSenders() public view returns (address origin, address sender) {
origin = [1];
sender = [2];
}This function returns tx.origin as the original transaction sender and msg.sender as the immediate caller.
Fill all three blanks to create a function that returns the original sender, immediate caller, and contract address.
function getContext() public view returns (address origin, address sender, address contractAddr) {
origin = [1];
sender = [2];
contractAddr = [3];
}This function returns tx.origin as the original transaction sender, msg.sender as the immediate caller, and address(this) as the contract's own address.