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.
Useful links
This article originally appeared on lightrains.com
Leave a comment
To make a comment, please send an e-mail using the button below. Your e-mail address won't be shared and will be deleted from our records after the comment is published. If you don't want your real name to be credited alongside your comment, please specify the name you would like to use. If you would like your name to link to a specific URL, please share that as well. Thank you.
Comment via email