Structs/Arrays/Mappings passed as arguments to a function may be by value (memory) or reference (storage) as specified by the data location (optional before solc 0.5.0
). Ensure correct usage of memory and storage in function parameters and make all data locations explicit. (see here)
- Function Parameters
- Reference Types
- Pass by Value
- Pass by Reference
- Structs/Arrays/Mappings
- Memory vs. Storage
- Unexpected Changes
- Aware: Value/Reference