DEV Community

Cover image for check my latest Smartcontract Deployment.
MahaLakshmi Perumal
MahaLakshmi Perumal

Posted on

check my latest Smartcontract Deployment.

Today I have created a SmartContract for sending money, it was just a testing small code as follow

"pragma solidity ^0.6.0;
contract SendMoneyExample {
uint public balanceReceived;
function receiveMoney() public payable {
balanceReceived += msg.value;
}
function getBalance() public view returns(uint) {
return address(this).balance;
}
function withdrawMoney() public { // not payable because we are taking money out, not in
address payable to = msg.sender;
to.transfer(this.getBalance());
}
function withdrawMoneyTo (address payable _to) public {
_to.transfer(this.getBalance());
}
}"

here is my deployment link on XinFin Network: https://explorer.xinfin.network/tx/0x4dc8aafeb6609027acfdfe0a2819b105c15eb9f0a45fd72593b01465486b8009

Check the video: https://www.linkedin.com/posts/mahalaxmi-perumal-244a291b8_video-smartcontracts-blockchain-activity-6724616598310719488-_6Ik

Discussion (0)