pragma solidity ^0.4.24; contract Foo02{ mapping(address=uint256) public personToMoney; constructor() public payable{ // if(msg.value100){ // revert(); // } require(msg.value100,"exception1111"); personToMoney[msg.sender]=msg.value; } funct
contract Foo02{
mapping(address=>uint256) public personToMoney;
constructor() public payable{
// if(msg.value>100){
// revert();
// }
require(msg.value>100,"exception1111");
personToMoney[msg.sender]=msg.value;
}
function getBalance() public view returns(uint256){
return address(this).balance;
}
}
remix中的新版本