Jatinpandya26 / EthDeX

Morden Ethereum Exchange with Zeeve

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eth-dex

2023-05-19-12-18-54

Description -> Basic Ethereum decentralized exchange

Run this project

How to setup locally?

To run this project locally, follow these steps.

Prerequisites

  1. Install Git
  2. Install Node.js version "v18.16.0" for this dapp, use nvm for better management of node versions.
  3. Install Yarn (optional)
  4. Install Truffle Truffle
  5. Install Metamask
  6. Create RPC API Enpoint for Ethereum Test Network Sepolia

Please follow screenshots

2023-05-19-12-05-44

2023-05-19-12-08-57

2023-05-19-12-11-35

2023-05-19-12-13-29

Screenshot from 2023-05-19 14-55-19

  1. Add Custom Network RPC

    1. Sepolia url: 'https://app.zeeve.io/shared-api/eth/f7d5b6624c939b41b58bc6df223df685bde85f1058f03dbe/'
    2. Chain Id: 11155111
  2. Fund your wallet from the Sepolia Faucet

Application Setup Steps

  1. Clone the project locally, change into the directory, and install the dependencies:
git clone https://github.com/Zeeve-App/sample-dapps.git

cd sample-dapps/dapps/eth-dex
  1. npm install

  2. Update truffle-config.js file

var HDWalletProvider = require("truffle-hdwallet-provider");
var mnemonic = "your_metamask_wallet_passphrase";

module.exports = {
  networks: {
    development: {
      host: '127.0.0.1',
      port: 7545,
      network_id: '*',
    },
    sepolia: {
      provider: function() { 
       return new HDWalletProvider(mnemonic, "https://app.zeeve.io/shared-api/eth/f7d5b6624c939b41b58bc6df223df685bde85f1058f03dbe/");
      },
      network_id: 11155111,
      gas: 4500000,
      gasPrice: 10000000000,
    }
  },
  contracts_directory: './src/contracts/',
  contracts_build_directory: './build/contracts/',
  test_file_extension_regexp: /.*\.test.ts$/,
  compilers: {
    solc: {
      version: '0.8.14',
      optimizer: {
        enabled: true,
        runs: 200,
      },
      evmVersion: 'petersburg',
    },
  },
};
  1. Compile the contract by running the truffle compile command

  2. Deploy the smart contract on the Sepolia Ethereum test network by running the truffle migrate --network sepolia command

  3. npm run dev

About

Morden Ethereum Exchange with Zeeve

License:MIT License


Languages

Language:TypeScript 70.6%Language:Solidity 23.2%Language:JavaScript 5.8%Language:CSS 0.3%