Git Product home page Git Product logo

swayswap's Introduction

build discord twitter

⚠️ Support Notice ⚠️

SwaySwap is no longer supported and will not function for beta-4 and later versions of fuel-core (>0.17.1). If you would like to contribute updating it, a PR will be welcome.


🌴💰 SwaySwap 💰🌴

SwaySwap is a blazingly fast DEX built on the fastest modular execution layer: Fuel.

Built with an entirely new language (Sway), virtual machine (FuelVM), and UTXO-based smart contract blockchain (Fuel), you can now experience a demonstration of the next generation of scaling beyond layer-2s and monolithic blockchain design.

📗 Table of contents

🧰 SwaySwap Features

  • Faucet coins; use the faucet API to send test ETH to your wallet
  • Mint tokens; Use the token contract to mint test DAI to your wallet
  • Create a liquidity pool
  • Swap tokens
  • View current pool positions
  • Add and remove liquidity from a liquidity pool


preview pages

License

The primary license for this repo is Apache-2.0, see LICENSE.

swayswap's People

Contributors

adlerjohn avatar alicanc avatar camsjams avatar controlcpluscontrolv avatar eureka-cpu avatar joshuabatty avatar luizasfight avatar luizstacio avatar matt-user avatar mohammadfawaz avatar nedsalk avatar pedronauck avatar pixelsbyeryc avatar simonr0204 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

swayswap's Issues

Add landing page

The app should have a landing page with a brief description of what it is, why it's important and a button to get started.

Take Uniswap landing as an example.

Auto-faucet upon landing with zero balance

If a user doesn't have a balance, SwaySwap should auto facuet me coin and present a message nicely saying "Fauceting you test Ether".

I shouldn't need to manually hit the faucet button.

Also, if you want the faucet button to be the primary action on the wallet page, then it should be in an action color like green to signal I need to press it.

Create feature to support dynamic token list

Today some parts of the code only work with ETH -> TOKEN and TOKEN -> ETH.

Contracts

  • Add methods to add / remove tokens to the list of supported tokens
  • Add some way to insert / retrieve metadata to the tokens, like custom code/name and icon URL or binary.

Client

  • Change static coins.ts to retrieve the list of token from the swayswap_contract with metadata (name, img)

Add infos about `.env` on the root `README.md`

How it works

When we run npm install we automatically copy the .env.example file to the .env.
On the .env we have;
REACT_APP_FUEL_PROVIDER_URL - Link for the fuel node
REACT_APP_CONTRACT_ID - Id of the swayswap contract Id
REACT_APP_TOKEN_ID - Id of the token contract id

Originally posted by @luizstacio in #60 (comment)

SwaySwap MVP

Persist input values when changing tabs

Better persistence on the inputs (i.e. if you type a number on one page, switch over to another, then come back, then it removes the value"

  • Swap Page
  • Pool Page

Unnecessary warning when a struct member is not accessed but the struct is returned

Compiling the following causes a warning:

contract;

abi MyContract {
    fn foo(s: S) -> S;
}

struct S {
    x: u:64,
}

impl MyContract for Contract {
    fn foo(s: S) -> S {
        s 
    }
}

Result:

❯ forc build
  Compiled library "core".
  Compiled library "std".
warning
  --> proj/src/main.sw:15:5
   |
13 |
14 | struct S {
15 |     x: u64,
   |     - This struct field is never accessed.
16 | }
   |
____

  Compiled contract "proj" with 1 warning.
  Bytecode size is 76 bytes.

The warning is out of place here since this is perfectly legal code and even though x is never accessed in foo directly, it is being implicitly used.

[Styles] Revamp the swap design

I can take the lead on this, since it might not be a priority for the team.

I'm testing a revamp to the design using Radix UI Colors.

Here's the Figma File I'm working with.

Colors:

Font: Inter (with a few caveats)

Icons: Heroicons - a library from the guys that created TailwindCSS.

Let me know what you think, how it's looking. I'll introduce some of the changes in future commits. Don't want to proceed with the PR until we have some of these things "approved". @luizstacio in this case, should I open a new issue and move the PR to a draft? What's the best practice?

Preview

Entire UI (WIP)

Screen Shot 2022-04-29 at 3 10 24 AM

Menu Item States

Screen Shot 2022-04-29 at 3 14 37 AM

Menu Wallet Design (WIP)

Screen Shot 2022-04-29 at 3 14 57 AM

Originally posted by @pixelsbyeryc in #53 (comment)

Implement dynamic tokens feature

  • Create support on token contract to set name and image url
  • Add support on SwaySwap contract to list tokens
  • Add support on SwaySwap contract to list pools
  • Add support on SwaySwap contract to add tokens
  • Add support on SwaySwap contract to add exchange contract

Create overall documentation

Root README

  • Environment requirements
  • How to run the docker
  • How to build contract
  • How to deploy contract
  • How to run front-end
  • Explain folder structure
  • Setting env values
  • ….

App REAMDE

  • Explain folder structure

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.