Llamadas entre contratos
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ContratoExterno {
function funcionExterna(string calldata mensaje) external returns (bool);
}contract MiContrato {
function llamarFuncionExterna(address direccionExterna, string memory mensaje) public returns (bool) {
ContratoExterno contrato = ContratoExterno(direccionExterna);
return contrato.funcionExterna(mensaje);
}
}Last updated