Closed pyAndr3w closed 1 year ago
At the moment, to remove an element from mapping, we can only use
delete mapping[key]
However, in TVM there is an opcode for simultaneous deletion and retrieval of an element - DICTDELGET.
DICTDELGET
It would be very convenient to use this method to save on gas.
expected syntax:
<map>.getDel(KeyType key) returns (optional(ValueType));
@pyAndr3w Hi, thank you for the issue! We plan to implement this in the next version
Implemented in 0.71.0 (2023-07-20) #141
At the moment, to remove an element from mapping, we can only use
However, in TVM there is an opcode for simultaneous deletion and retrieval of an element -
DICTDELGET
.It would be very convenient to use this method to save on gas.
expected syntax: