GithubHelp home page GithubHelp logo

berachain / polaris Goto Github PK

View Code? Open in Web Editor NEW
1.0K 53.0 307.0 29.1 MB

Polaris is a modular implementation of the Ethereum Virtual Machine (EVM). It can be easily integrated into any consensus engine or application, including the Cosmos-SDK.

Home Page: https://polaris.berachain.dev/

License: Other

Go 85.22% Shell 5.46% Solidity 6.16% Dockerfile 0.93% Makefile 1.29% Io 0.80% JavaScript 0.14%
cosmos ethereum evm go defi blockchain golang mev web3

polaris's Introduction

Polaris Monorepo ❄️🔭

The project is still work in progress, see the disclaimer below.

What is Polaris?

Introducing Polaris, the revolutionary framework designed to simplify the integration of an Ethereum Virtual Machine (EVM) into your application. Polaris is built with a clean, easy-to-integrate API that eliminates the need for developers to spend time hacking together their own EVM integration solutions. Our framework is highly modular, allowing you to choose the components that best fit your needs and integrate an EVM environment into virtually any application.

Polaris is built with several core principles in mind:

  1. Modularity: Each component is developed as a distinct package, complete with thorough testing, documentation, and benchmarking. You can use these components individually or combine them to create innovative EVM integrations.
  2. Configurability: We want Polaris to be accessible to as many teams and use cases as possible. To support this, our framework is highly configurable, allowing you to tailor it to your specific needs.
  3. Performance: In today's competitive crypto landscape, performance is key. Polaris is optimized to deliver the highest levels of performance and efficiency.
  4. Contributor Friendliness: We believe that open collaboration is key to driving innovation in blockchain development. While Polaris is currently licensed under BUSL-1.1, we plan to adjust our licensing to support contributor-based schemes as we approach production readiness.
  5. Memes: If ur PR doesn't have a meme in it like idk sry bro, gg wp glhf.

Documentation

If you want to build on top of Polaris, take a look at our documentation. If you want to help contribute to the framework, check out the Framework Specs.

Directory Structure

Polaris utilizes go workspaces to break up the repository into logical sections, helping to reduce cognitive overhead.

🔭 Polaris 🔭
├── build: Build scripts and developer tooling.
├── contracts: Contracts and bindings for Polaris (and hosts).
├── cosmos: Polaris integrated into a Cosmos-SDK based chain.
├── e2e: End-to-end testing utilities.
├── eth: The Core of the Polaris Ethereum Framework.
├── lib: A collection of libraries used throughout the repo.
├── proto: Protobuf definitions.

Build & Test

Golang 1.20+ and Foundry are required for Polaris.

  1. Install go 1.21+ from the official site or the method of your choice. Ensure that your GOPATH and GOBIN environment variables are properly set up by using the following commands:

    For Ubuntu:

    cd $HOME
    sudo apt-get install golang jq -y
    export PATH=$PATH:/usr/local/go/bin
    export PATH=$PATH:$(go env GOPATH)/bin

    For Mac:

    cd $HOME
    brew install go jq
    export PATH=$PATH:/opt/homebrew/bin/go
    export PATH=$PATH:$(go env GOPATH)/bin
  2. Install Foundry:

    curl -L https://foundry.paradigm.xyz | bash
  3. Clone, Setup and Test:

    cd $HOME
    git clone https://github.com/berachain/polaris
    cd polaris
    git checkout main
    make test-unit
  4. Start a local development network:

    make start

🚧 WARNING: UNDER CONSTRUCTION 🚧

This project is work in progress and subject to frequent changes as we are still working on wiring up the final system. It has not been audited for security purposes and should not be used in production yet.

The network will have an Ethereum JSON-RPC server running at http://localhost:8545 and a Tendermint RPC server running at http://localhost:26657.

polaris's People

Contributors

archbear avatar brickbera avatar calbera avatar corduroybera avatar dbadoy avatar dependabot[bot] avatar dzizazda avatar ethisscam avatar garrettparris avatar hunter-bera avatar itsdevbear avatar jcstein avatar kienn6034 avatar lilasxie avatar mmsqe avatar nashqueue avatar neverdefined avatar ocnc avatar omahs avatar po-bera avatar pucedoteth avatar shampoobera avatar shuoer86 avatar steve806 avatar taeguk avatar technicallyty avatar tnv1 avatar tranhoaison avatar transmissions12 avatar xiaolou86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polaris's Issues

Postgres Infrastructure

  • Migration Scripts / Handlers for containerized
  • Docker-Compose Infrastructure
  • Database / gRPC abstraction for building endpoints without needing to configure / add any "redis or postgres" code to endpoints. "Generalized caching"

JSON-RPC Server

###Description:

As part maintaing full evm compatibility and making sure web3 wallets work, we need to handle JSON-RPC.

Todos

Resources / Libraries to look at:

  • Determine Architecture
  • ....

┆Issue is synchronized with this Asana task by Unito

Core EVM

Components

  • Virtual Machine
  • Interpreter
  • StateDB
  • Precompile Infrastructure

┆Issue is synchronized with this Asana task by Unito

epic(evm): ERC20 Middleware

Description:

Create a middleware system to allow for ERC20 and ICS20 tokens to seemlessly interoperable.

Functional Requirements

  • Token starts as ERC20 -> Handle escrowing and minting a native denominated balance.
  • Token starts as ICS20 -> Handle deploy of a "BankModuleERC20".
  • Handle precompile interop logic.

Todos:

┆Issue is synchronized with this Asana task by Unito

feat(evm): Transaction Flow + Ante Handler + Mempool

We want to try and avoid the double ante handler sheninigans we have seen in the past and to do so, as we build out a proto Message to transport an ethereum payload, we need to think about how that piece of data can go through Ante Handlers in a way that reduces duplicate code and "copy pasta'ing" from the SDK as much as possible.

┆Issue is synchronized with this Asana task by Unito

Cannot propagate Cosmos errors as Ethereum errors

Cosmos module errors are not typed, only returned as error, which only has a Error() string function.

Because these strings are arbitrary and filled with context-specific parameters, we cannot map these Cosmos errors to corresponding Ethereum events, that Ethereum app devs can use.

Blocked on getting Typed Errors in the SDK.

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.