Skip to Content
Ethereum Cookbook
book

Ethereum Cookbook

by Manoj P R
August 2018
Intermediate to advanced
404 pages
11h 19m
English
Packt Publishing
Content preview from Ethereum Cookbook

How to do it…

  1. The standard handles the token transfers to a contract address. Follow this standard to create a function that will reject the transaction if the receiving contract does not support such functionality.
  2. The standard modifies the transfer function to include an additional data field. It also keeps the regular transfer function for backward compatibility. Use the following interface to implement a minimal ERC223 standard token:
pragma solidity ^0.4.23; contract ERC223Interface {     uint public totalSupply;     function balanceOf(address who) view returns (uint);     function transfer(address to, uint value) public;     function transfer(address to, uint value, bytes data) public;  event Transfer(address indexed from, address indexed to, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Ethereum Dapps

Building Ethereum Dapps

Roberto Infante
Ethereum For Dummies

Ethereum For Dummies

Michael G. Solomon

Publisher Resources

ISBN: 9781789133998Supplemental Content