DEV Community

Cover image for Deploy a Wallet Compitable Token on XinFin XDC Network
MahaLakshmi Perumal
MahaLakshmi Perumal

Posted on

2 1

Deploy a Wallet Compitable Token on XinFin XDC Network

How about deploying a Wallet Compitable Token on XinFin XDC Hybrid Blockchain Network under injected web3 environment. The network TPS is 2000 and Transaction fees is 0.0000007USD.

Check my code:
pragma solidity ^0.4.16;
contract WalletCompatibleToken {
string public name;
string public symbol;
uint8 public decimals;
mapping (address => uint256) public balanceOf;
event Transfer(address _from, address _to, uint _value);
function WalletCompatibleToken(string tokenName,string tokenSymbol,uint8 decimalUnits,uint256 initialSupply) {
name = tokenName;
symbol = tokenSymbol;
decimals = decimalUnits;
balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens
}
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) revert();
if (balanceOf[_to] + _value < balanceOf[_to]) revert();
balanceOf[msg.sender] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
Transfer(msg.sender,_to,_value);
}
}

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay