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. Run the following command to download and install vyper from its GitHub repository:
git clone https://github.com/ethereum/vyper.gitcd vypermakemake test
  1. After installation, verify it by compiling an example contract. To compile the contract, run the following command from the console:
vyper examples/name_registry.vy
  1. To modify the required compiler output, use the -f flag with an array of output parameters:
vyper -f ['abi', 'json', 'bytecode'] fileName.vy
  1. In Vyper, each contract is stored in a distinct file. Files in Vyper are similar to classes in object-oriented programming languages.

  1. To create a state variable in the Vyper contract, use the following syntax. The name and the data type have to be specified for ...
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