Code Monkey home page Code Monkey logo

tezdex-gamification's Introduction

Description

This project is a fork of quipuswap and adds logic that makes defi into a game with on chain scoring metrics and player levels calculated on chain. You can run the dapp here: https://main.d1vpiqu7jccsn6.amplifyapp.com

I didn't get this working in a complete sense. I'm missing a factory contract for converting the trading pair contracts into levels. I'm also missing a tilemap UI. I intended on making a pokemon style rpg interface for trading in the dapp and doing the defi tasks. I do have:

But it isn't yet playable.

Prerequisites

  • Installed NodeJS (tested with NodeJS v12+)

  • Installed Yarn (NPM isn't working properly with [email protected])

  • Installed Ligo:

curl https://gitlab.com/ligolang/ligo/raw/dev/scripts/installer.sh | bash -s "next"
  • Installed node modules:
cd quipuswap-core && yarn
  • Configure truffle-config.js if needed.

Quick Start

To compile and deploy contracts to Delphinet

  1. Chose configure the version - FA12 or FA2 - by setting EXCHANGE_TOKEN_STANDARD in .env and run:
yarn migrate

For other networks:

yarn migrate --network NAME

Usage

Contracts are processed in the following stages:

  1. Compilation
  2. Deployment
  3. Configuration
  4. Interactions on-chain

As the Quipuswap supports 2 token standards that vary only in the token interface implementation and the inter contract communication between Dex and external tokens, the shared codebase is used. Therefore to work with the specific standard version, you should configure it by setting EXCHANGE_TOKEN_STANDARD in .env to either FA12 or FA2.

Compilation

To compile the contracts run:

yarn compile

Artifacts are stored in the build/contracts directory.

Deployment

For deployment step the following command should be used:

yarn migrate

Addresses of deployed contracts are displayed in terminal. At this stage, new MetadataStorage, Factory are originated. Aditionaly, for testnets two new pairs are deployed.

Testing

If you'd like to run tests on the local environment, you might want to run ganache-cli for Tezos using the following command:

yarn start-sandbox

Truffle framework is used for testing. Run:

yarn test

NOTE: if you want to use a different network, configure truffle-config.js. If you need to use a different standard, configure $EXCHANGE_TOKEN_STANDARD in .env

tezdex-gamification's People

Contributors

kstasi avatar mryamz avatar lourenc avatar konchunas avatar

Stargazers

2box avatar  avatar  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.