New answers tagged

0 votes

Is it possible to encode a struct to calldata when calling another function?

No, it is not possible to modify calldata. It is read only from within the same transaction. To create calldata you could make an external call. function isPriceOkay(Price calldata price) external ...
Ismael's user avatar
  • 30.5k
0 votes

Is it possible to encode a struct to calldata when calling another function?

You can instantiate a new Price inline. Is it your concern? If yes, the example below demonstrates the syntax for that kind of assignment. However, you'll need to change the function's calldata to ...
Mila A's user avatar
  • 703

Top 50 recent answers are included