Coder Social home page Coder Social logo

dexbackend's Introduction

DexBackend

Rough Backend for Dex. We dont have authentication here!! Do not use this code in production env.


AddOwner: Anybody can be a owner in dex by paying some amount of defined fees. Right now it is kept to zero. You need to be an owner to list your product on Dex.

Func Parameters: owner: ETH account address of owners amount: Fee Amount


GetOnwerList: Get List of Owners and their Id's.

Fuc Params: owmer: ETH address of account

Return: Json object {"ownerList": result}, result is an array of array. result[0] = Array of owner addresses result[1] = Array of owner id's corresponding to owner address in result[0].


AddProduct: Once you are owner, you can list your product on exchange i.e. listing of token.

Func Parameters:

Product = Product i.e token address; owner = Owner ETH address which was used to call AddOwner!!; amount = Fee amount, fee for listing token on Dex platform;


GetProductList: Get List of Products currently listed on exchange.

Fuc Params: No params

Return: Json object {"productList": result}, result is an array of array. result[0] = Array of products result[1] = Array of product id's corresponding to product in result[0].


GetAccountList: Return account addresses of users and their corresponding Id's on dex.

Func Params: No params

Return: Json {"accountList": result}, result is array of array. result[0] = address of account holders result[1] = Id's corresponding to result[0].


depositETH & withdrawETH : Function for users/traders to add/withdraw ETHER to their/from account on dex.

Func Params:

amount = Amount to add/withdraw; owner = ETH address;


depositERC20 & withdrawERC20 : Functions to add/withdraw ERC20 token their account on dex.

Func Params:

amount = Amount to add/withdraw; owner = ETH address; token: token address


dexbackend's People

Contributors

neo2756 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.