-
-
Save manabubannai/e513bcfa7d607f6ad55ef39497b265b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.7.0 <0.9.0; | |
contract donation { | |
struct Person { | |
uint id; | |
string name; | |
uint256 amount; | |
address sender_address; | |
} | |
uint256 id = 0; | |
mapping(uint => Person) public people; | |
function addPerson(string memory name) public payable { | |
id += 1; | |
people[id] = Person(id, name, msg.value, msg.sender); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment