forked from argotorg/solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
My First Attempt At TrickleShed
KinSquare edited this page May 9, 2021
·
2 revisions
//TrickleShed - the coin anyone can mint
pragma solidity >=0.7.0<0.9.0;
contract TrickleShed {
address public anyone;
mapping (address => uint) public balances;
event Sent(address from, address to, uint amount);
function mint(address receiver, uint amount) public {
require(amount < 1e60);
balances[receiver] += amount;
}
function send(address receiver, uint amount) public {
require(amount <= balances[msg.sender], "Insufficient balance.");
balances[msg.sender] -= amount;
balances[receiver] += amount;
emit Sent(msg.sender, receiver, amount); //clueless on emit and why caps for Sent ?internal stuff?
}
}