address(this) and msg.sender
msg. sender is the address of the contract caller. address(this) is the address of the smart contract itself
address(this) and msg.sender
msg. sender is the address of the contract caller. address(this) is the address of the smart contract itself
address(this) and msg.sender
pragma solidity ^0.8.0;
contract Escrow {
address public owner;
constructor() {
owner = msg.sender;
}
function depositNothing() public view {
require(msg.sender == owner, 'You are not the owner!');
}
function balanceOf() view public returns(uint) {
return address(this).balance;
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us