Skip to content

Commit 8b32068

Browse files
Merge pull request #19 from xTwo56/feat_mappinglist
[Feature]: Instead of mapping with unit=>Details map it with address=>Details
2 parents ca8679c + ecf6e07 commit 8b32068

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

contract/Database.sol

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ contract Database{
1919
mapping( address => Details) private list;
2020

2121
uint256 private count=0;
22-
23-
24-
25-
2622
mapping (string => bool) public added;
27-
28-
2923
address public admin;
3024
bool alreadyset=false;
3125

@@ -34,14 +28,10 @@ contract Database{
3428

3529
}
3630

37-
3831
modifier personPresent{
3932
require(keccak256(abi.encodePacked(list[msg.sender].aadharId)) != keccak256(abi.encodePacked("")), "Person doesn't exist");
4033
_;
41-
}
42-
43-
44-
34+
}
4535
modifier Added (string memory aadhar)
4636
{
4737
require(!added[aadhar],"Details already added");
@@ -94,5 +84,6 @@ contract Database{
9484
return details;
9585
}
9686

87+
9788
}
9889

0 commit comments

Comments
 (0)