November 2018
Intermediate to advanced
528 pages
13h 21m
English
This is the other essential part of any minimal token implementation, and allows a balance to be transferred from one account to another:
function transfer(address _to, uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] -= _value; balanceOf[_to] += _value; emit Transfer(msg.sender, _to, _value); return true; }Let's break down what's happening:
Read now
Unlock full access