Newbie question! I am trying to understand some Solidity code, and I see what is apparently the calling of an unimplemented function. My question is about the syntax: unimplFunc{value: x}(data)
. What are the angle brackets for?
interface ICaller {
struct CallDescription {
uint256 value;
bytes data;
}
function makeCall(CallDescription memory desc) external;
function makeCalls(CallDescription[] memory desc) external payable;
}
Elsewhere, this unimplemented function is called like so:
function swap(
ICaller caller,
ICaller.CallDescription[] calldata calls
)
external
payable
whenNotPaused
returns (uint256 returnAmount)
{
//
// This is the syntax I am puzzled over
//
caller.makeCalls{value: 1}(calls);
. . . etc . . .
Maybe that syntax is for over-riding a field in the struct argument? What's especially puzzling is that this function makeCalls
is never implemented.
If it helps, the input value I observed for calls
is:
calls.value = 0
calls.data = 0xb3af37c000000000000000000000000000000000000000000000000000000000000000808000000000000000000000000000000000000000000000000000000000000024000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000001400000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002445636885000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000083314c5f8bab1f01a5f64e01cda3c4a0ea75b6ba00000000000000000000000083314c5f8bab1f01a5f64e01cda3c4a0ea75b6ba0000000000000000000000000000000000000000000000002789438280458ffd000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000002a1530c4c41db0b0b2bb646cb5eb1a67b715866700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011c37937e0800000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064ad65d76d0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000005fd0169e00000000000000000000000083314c5f8bab1f01a5f64e01cda3c4a0ea75b6ba0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000