Calling other smart contract onlyOwner question


can someone explain me why can't i call Kill contract from Helper contract if i set modifier and constructor to owner == msg.sender in Kill contract ? When i try to call from Helper its reverting and saying im not the owner even though i call from owner address. When i call directly from Killcontract with the same address it's perfectly fine.

Code below:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

contract Kill {

    address public owner;

    constructor() payable {
        owner = msg.sender;

    modifier onlyOwner {
        require(owner == msg.sender, "You are not the owner");
    function kill() external onlyOwner {

    function testCall() external pure returns (uint) {
        return 123;

contract Helper {

    function getBalance() public view returns (uint) {
        return address(this).balance;

    function kill(Kill _kill) external {

If you deploy both contracts then you are msg.sender and set as the owner.

If you call Helper.kill() then the msg.sender received is you, however then the helper contract calls the kill contract. That msg is send by helper contract, so msg.sender == helper, not you calling the helper contract