github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/execution/testdata-shanghai/mapping-delete.sol (about) 1 // SPDX-License-Identifier: GPL-3.0 2 3 pragma solidity ^0.8.14; 4 5 contract MyContract { 6 struct Data { 7 uint256 a; 8 uint256 b; 9 } 10 mapping(uint256 => Data) public items; 11 12 constructor() { 13 items[0] = Data(1, 2); 14 items[1] = Data(3, 4); 15 items[2] = Data(5, 6); 16 delete items[1]; 17 } 18 }