Looking at this article about contract interactions, I saw this line of code:
someAddress.call.gas(1000000).value(1 ether)("register", "MyName");
With the explanation:
It’s also possible to provide gas and ether for a call invocation
I went on to modify the call. in the provided Caller.sol contract like this:
addr.call.gas(1000000).value(1 ether)(bytes4(keccak256("storeValue(uint256)")), 100);
To understand how providing gas would work. The remix output was not particularly insightful, so here I am hoping to get answers. Does the caller account provide gas units for Caller.sol to use while calling the Callee.sol function? If yes, how does this work? How are said gas units aquired? What happens to leftover gas? Or does it mean I am providing enough fees to cover this amount of gas expended? Thanks for any clarifications on the matter.