# Вызов Called при помощи address

By [Meninsy](https://paragraph.com/@vikk1) · 2024-01-31

---

    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.24;
    contract Called {
        bool public myBool;
        function foo() public pure returns (string memory) {
            return "A";
        }
    }
    
    contract Caller {
        function callFooFunction(address _a) public returns (bytes memory) {
            (bool success, bytes memory data) = _a.call(abi.encodeWithSignature("foo()"));
            require(success, "Call failed");
            return data;
        }
    }

---

*Originally published on [Meninsy](https://paragraph.com/@vikk1/called-address)*
