Fe - Ethereum smart contract language

The next generation smart contract language for Ethereum. Create decentralized applications in a powerful, future-proof and statically typed language that is easy to learn.

Fe - Ethereum smart contract language
by Nikhil M posted on Tue, Dec 14, 2021 in fe-lang

Introduction

Fe is an evolving smart contract language that strives to make EVM development safer, simpler and more fun. The syntax of Fe is inspired by Python and Rust. It is easy to learn, even for those who have never dealt with the EVM before. Fe is designed to be safe and equipped with the tooling needed to validate contracts.

Why Fe?

Fe uses the same intermediate language as Solidity (YUL), making it a great choice not only for the Ethereum mainnet, but also for many of the upcoming Layer 2 solutions like the OVM.

Major highlights of Fe lang

Static typing

Statically typed and equipped with a powerful compiler, Fe guides us to write robust code and avoid bugs.

Improved decidability

Fe limits dynamic program behavior to improve decidability and allow more precise gas cost estimation.

Standard library

Fe aspires to offer a rich standard library to assist with common tasks of smart contract development.

Fe Quickstart

At this point Fe is only distributed via a single executable file linked from the official home page. In the future we will make sure it can be installed through popular package managers such as apt or homebrew.

For Apple Mac computers you can download fe v0.11.0-alpha

Give necessary execution permissions for the downloaded binary. On Apple MAc run chmod a+x fe_mac from the downloaded location.

Simple Fe program

contract GuestBook:
  messages: Map<address, String<100>>

  pub fn sign(self, book_msg: String<100>):
      self.messages[msg.sender] = book_msg

  pub fn get_msg(self, addr: address) -> String<100>:
      return self.messages[addr].to_mem()

Now you can compile this program using ./fe_mac guest_book.fe assuming you have saved the above program in guest_book.fe file.