๐ 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
- Security: It should be possible and natural to build secure smart-contracts in Vyper.
- Language and compiler simplicity: The language and the compiler implementation should strive to be simple.
- 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
- Bounds and overflow checking: On array accesses and arithmetic.
- Support for signed integers and decimal fixed point numbers
- Decidability: It is possible to compute a precise upper bound for the gas consumption of any Vyper function call.
- Strong typing
- Small and understandable compiler code
- Limited support for pure functions: Anything marked constant is not allowed to change the state.
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
| N | URL | Description |
|---|---|---|
| 1 | Vyper Official Website | Website and documentation |
| 2 | Vyper Official Github Repo | Official Github Repository |
User
Note since these are from users, accuracy of the information cannot be guaranteed, please use them at your own risk.
| N | Type | URL | Description |
|---|---|---|---|
| 1 | โถ๏ธ Youtube | Vyper-by-Example | made by the same author of Solidity by example |
| 2 | โถ๏ธ Youtube | Curve Vyper Turorial | n00b 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.
| โN | Type | URL | Description |
|---|---|---|---|
| 1 | Repo | Foundry-Vyper | Compile and write cotnracts in Vyper |
| 2 | Repo | SnekMate | State-of-the-art, highly opinionated, hyper-optimised, and secure Vyper smart contract building blocks. |
| 3 | Repo | Apeworkx + Vyper Starter Kit | Starter 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