dex
所属分类:区块链开发
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2022-02-24 18:02:04
上 传 者:
sh-1993
说明: 即时去中心化加密货币交换
(Instant decentralized cryptocurrency exchange)
文件列表:
.babelrc (50, 2022-02-24)
LICENSE.txt (1071, 2022-02-24)
imgs/ (0, 2022-02-24)
imgs/buy.png (69619, 2022-02-24)
imgs/main.png (67632, 2022-02-24)
imgs/sell.png (69793, 2022-02-24)
migrations/ (0, 2022-02-24)
migrations/1_initial_migration.js (125, 2022-02-24)
migrations/2_deploy_contracts.js (444, 2022-02-24)
package-lock.json (893441, 2022-02-24)
package.json (991, 2022-02-24)
public/ (0, 2022-02-24)
public/favicon.ico (169597, 2022-02-24)
public/index.html (1617, 2022-02-24)
public/manifest.json (305, 2022-02-24)
src/ (0, 2022-02-24)
src/catto-logo.png (4884, 2022-02-24)
src/components/ (0, 2022-02-24)
src/components/App.css (21, 2022-02-24)
src/components/App.js (3827, 2022-02-24)
src/components/BuyForm.js (2559, 2022-02-24)
src/components/Main.js (1461, 2022-02-24)
src/components/Navbar.js (1042, 2022-02-24)
src/components/SellForm.js (2562, 2022-02-24)
src/contracts/ (0, 2022-02-24)
src/contracts/CattoToken.sol (1564, 2022-02-24)
src/contracts/EthSwap.sol (1726, 2022-02-24)
src/contracts/Migrations.sol (515, 2022-02-24)
src/eth-logo.png (4472, 2022-02-24)
src/index.js (483, 2022-02-24)
src/logo.png (49883, 2022-02-24)
src/serviceWorker.js (4951, 2022-02-24)
test/ (0, 2022-02-24)
test/EthSwap.test.js (4006, 2022-02-24)
truffle-config.js (402, 2022-02-24)
Decentralized Exchange Catto
Instant decentralized cryptocurrency exchange
Table of Contents
-
About The Project
-
Getting Started
- Usage
- Roadmap
- License
- Contact
## :computer: About The Project
Instant decentralized cryptocurrency exchange powered by the ethereum blockchain that allows for ERC20 cryptocurrency transactions to take place at a fixed price
(back to top)
### Built With
* [Solidity](https://docs.soliditylang.org/en/v0.8.12/)
* [web3.js](https://web3js.readthedocs.io/en/v1.7.0/)
* [Truffle](https://trufflesuite.com)
* [Chai.js](https://www.chaijs.com)
* [Identicon.js](https://github.com/stewartlord/identicon.js/tree/master)
* [React.js](https://reactjs.org/)
* [Node.js](https://nodejs.org/en/)
(back to top)
## :hammer_and_wrench: Getting Started
### Installation
1. Clone the repo
```sh
git clone https://github.com/gumastro/dex.git
```
2. Install NPM packages
```sh
npm install
```
3. Open Ganache and run the migrations
```sh
truffle migrate --reset
```
4. Start NPM packages
```sh
npm run start
```
5. Import an address to Metamask
* Make sure your Metamask is connected to the right network (same as Ganache test network)
* RPC URL
`http://localhost:7545`
* Chain ID
`1337`
6. Swap!
(back to top)
## :star2: Usage
### Buy
1. Click on Buy option
2. Select desired amount of Ether to pay
3. Click on Swap!
4. Confirm transaction on Metamask pop-up
5. Enjoy your tokens!
### Sell
1. Click on Sell option
2. Select desired amount of Catto to sell
3. Click on Swap!
4. Give permission to access your Catto on Metamask pop-up
5. Confirm transaction on Metamask pop-up
6. Enjoy your tokens!
(back to top)
## :white_check_mark: TODO
- [ ] Add fee exchange to collect profit
- [ ] Make exchange rate dynamic
- [ ] Support multiple tokens
(back to top)
## :memo: License
Distributed under the MIT License. See `LICENSE.txt` for more information.
(back to top)
## :mailbox: Contact
Gustavo Tuani Mastrobuono - gumastro@usp.br
(back to top)
[dex-catto-screenshot]: imgs/main.png
[buy-catto-screenshot]: imgs/buy.png
[sell-catto-screenshot]: imgs/sell.png
近期下载者:
相关文件:
收藏者: