Giter Site home page Giter Site logo

fe's Introduction

Fe is an emerging smart contract language for the Ethereum blockchain.

Build Status Coverage

Overview

Fe is a statically typed language for the Ethereum Virtual Machine (EVM). It is inspired by Python and Rust and is easy to learn even for developers who are new to the Ethereum ecosystem.

Features & Goals

  • Bounds and overflow checking
  • Decidability by limitation of dynamic program behavior
  • More precise gas estimation (as a consequence of decidability)
  • Static typing
  • Pure function support
  • Binary fixed-point math
  • Restrictions on reentrancy
  • Static looping
  • Module imports
  • Standard library
  • Usage of YUL IR to target both EVM and eWASM
  • WASM compiler binaries for enhanced portability and in-browser compilation of Fe contracts
  • Implementation in a powerful, systems-oriented language (Rust) with strong safety guarantees to reduce risk of compiler bugs

Additional information about design goals and background can be found in the official announcement.

Language Specification

We aim to provide a full language specification that should eventually be used to formally verify the correctness of the compiler. A work in progress draft of the specification can be found here.

Progress

Fe development is still in its early stages. We have a basic Roadmap for 2021 that we want to follow. We generally try to drive the development by working through real world use cases. Our next goal is to provide a working Uniswap implementation in Fe which will help us to advance and form the language.

The first alpha version will be out in January 2021, followed by another release every month.

Examples

The following is a simple contract implemented in Fe.

type BookMsg = bytes[100]

contract GuestBook:
    pub guest_book: map<address, BookMsg>

    event Signed:
        book_msg: BookMsg

    pub def sign(book_msg: BookMsg):
        self.guest_book[msg.sender] = book_msg

        emit Signed(book_msg=book_msg)

    pub def get_msg(addr: address) -> BookMsg:
        return self.guest_book[addr].to_mem()

A lot more working examples can be found in our test fixtures directory.

The most advanced example that we can provide at this point is a fully working ERC20 implementation.

Getting started

Community

fe's People

Contributors

davesque avatar g-r-a-n-t avatar cburgdorf avatar danieliniguezv avatar ro5s avatar satyamakgec avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.