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)
- Host: GitHub
- URL: https://github.com/code-architect/erc20-decentralized-exchange
- Owner: code-architect
- Created: 2024-03-11T20:15:10.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-14T22:10:00.000Z (over 1 year ago)
- Last Synced: 2024-12-28T13:33:55.673Z (10 months ago)
- Topics: blockchain, decentralized-exchange, dex, erc, ethereum, javascript, smart-contract, smart-contracts, solid
- Language: JavaScript
- Homepage:
- Size: 405 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.