- Languages used: Solidity, Javascript, Html, Css
- What you will need in order to interact with this contract : Metamask account, a test blockhain which contains some test Ether token.
There are 2 parts of this project:
-A wallet part where you can add or withdraw any ETH or Chainlink Token ( if the metamask account is having LINK and ETH of course ). -A Dex part where you can place Limit orders or Market orders to fill the Limit orders
- In order to interact with this contract, you will need a Metamask account and a test blockchain, such as truffle.
When this contract is deployed, it will mint 10000 LINK, for ETH you will need to get a test private key (for example from Truffle test blockchain).
- Right now you can Sell and Buy only with Chainlink as the function is written like that, probably I will change it to accept any kind of token in the future
-You can add any token with this function to the tokenList array in order to deposit amounts later
- You can deposit any amount of token with this function which has already been added to the tokenList
- Same thing just vice versa, you can withdraw any amount of tokens with any kind which is already in the wallet
- If there were any limit orders placed here, this function will show you for which token it been placed for, whether it is a sell or buy, the amount and the price.
- It also shows how many of the token deposited in each order has been already filled.
- An easy function to deposit any ETH to the wallet
- Same thing but withdraw
- With this function you can create a buy or sell limit order, with the added amount and price
-With this function you can create a sell or buy Market order. If there is already a limit order in the opposite side, the trade will take place accordingly
- Simple function, shows you the tokenList Array.
- Connects with metamask and gets the inputted amount of eth to the contract
- Same thing but vice versa
- This shows you if there is any Order placed in the Sell Side
- Same thing but in the Buy Side
- This places the Limit order on the frontend and puts it into the orderbook array.
- It places a market order and executes the trade if there is already a Limit order placed in the opposite side
- This shows you the walletBalance of the contract if there is any
- This shows you the Token the contract has ( when deployed, it will show you the Chainlink amount what is minted)
- You can add any other Tokens from Metamask ( only works with Chainlink right now)
- Same thing but opposite
If you have any questions, write here: [email protected]