๐Ÿ Vyper


Page Map


๐Ÿ What is Vyper Lang ?

Vyper is a contract-oriented, pythonic programming language that targets the Ethereum Virtual Machine (EVM).

Principles and Goals

  1. Security: It should be possible and natural to build secure smart-contracts in Vyper.
  2. Language and compiler simplicity: The language and the compiler implementation should strive to be simple.
  3. Auditability: Vyper code should be maximally human-readable. Furthermore, it should be maximally difficult to write misleading code. Simplicity for the reader is more important than simplicity for the writer, and simplicity for readers with low prior experience with Vyper (and low prior experience with programming in general) is particularly important.

Features

  1. Bounds and overflow checking: On array accesses and arithmetic.
  2. Support for signed integers and decimal fixed point numbers
  3. Decidability: It is possible to compute a precise upper bound for the gas consumption of any Vyper function call.
  4. Strong typing
  5. Small and understandable compiler code
  6. Limited support for pure functions: Anything marked constant is not allowed to change the state.

Tip

This run with small contract using Huff, Solidity, vypepr & yul, revealed that vyper used less gas durinf the smart contract compilation process. Huff had the least gas usage but it is a low level language.

While this isnโ€™t indicative of how it would be used in production. It it gives a good idea of the design of the vyper.

๐Ÿ Resources

Official

NURLDescription
1Vyper Official WebsiteWebsite and documentation
2Vyper Official Github RepoOfficial Github Repository

User

Note since these are from users, accuracy of the information cannot be guaranteed, please use them at your own risk.

NTypeURLDescription
1โ–ถ๏ธ YoutubeVyper-by-Examplemade by the same author of Solidity by example
2โ–ถ๏ธ YoutubeCurve Vyper Turorialn00b guide on writing and deploying vyper contracts

๐Ÿ Templates

List of templates for general vyper delopment. There might be many, which will be posted, This list maybe updated with those that I find interesting.

โ€™NTypeURLDescription
1RepoFoundry-VyperCompile and write cotnracts in Vyper
2RepoSnekMateState-of-the-art, highly opinionated, hyper-optimised, and secure Vyper smart contract building blocks.
3RepoApeworkx + Vyper Starter KitStarter kit for writing contracts from - smartcontractkits

Template Demo Usage

The following is a usage demo of #1 from the above list

Note this is an oversized .gif - right click and open in new tab