// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
// Contract for performing addition of three numbers
contract TargetContract {
// Returns the sum of three given values
function GetAddition(uint256 firstVal, uint256 secondVal, uint256 thirdVal) public pure returns(uint256){
return firstVal + secondVal + thirdVal;
}
}
// Contract for calling the TargetContract's GetAddition function
contract CallingContract {
TargetContract targetContract;
// Constructor to instantiate a new TargetContract upon deployment of CallingContract
constructor(){
targetContract = new TargetContract();
}
// Invokes the GetAddition function of the TargetContract using Solidity assembly
function InvokeTarget(uint256 firstVal,