An open API service indexing awesome lists of open source software.

https://github.com/code-architect/erc20-decentralized-exchange

ERC20 and Decentralized Exchanges (DEXs)
https://github.com/code-architect/erc20-decentralized-exchange

blockchain decentralized-exchange dex erc ethereum javascript smart-contract smart-contracts solid

Last synced: 8 months ago
JSON representation

ERC20 and Decentralized Exchanges (DEXs)

Awesome Lists containing this project

README

          

# Sample Hardhat Project

This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.

Try running some of the following tasks:

```shell
npm init
npm install --save-dev hardhat
npx hardhat
npm i @openzeppelin/contracts
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.js
```

<<<<<<< HEAD
## Explanation of the Contract
- `sell()` : This is to check and see if owner of the contract has given an allowance to this contract from the token contract.
- `withdrawTokens()` : The owner of the tokens can any point of time can withdraw.
- `withdrawFunds()` : The owner of the contractan collect any funds thios contract has collected.
- `getprice()` : Get the price of the tokens.
- `buy(uint numTokens)` : The number of tokens tghe user want to buy
- `getToenBalance()` : can be an Internal function to check balance.