This contract uses chainlink v2 pricefeed to create a market for token pairs. The market allow any address to swap from token A to token B permissionlessly given that Token A and Token B are supported by chainlink price feeds on chosen network
- yarn
- node v16
- hardhat
- ethers.js
- Allows customization of tokens and aggregation
- Automatically fetches tokens symbols at intialization
- Allows quote-fetching(getQuotes) for token pairs prior to exchange using just token-pair symbols and amount
- Allows two-ways token-pair swapping
- Solidity – Smart contract development
- Hardhat – Testing and deployment framework
- Chainlink Oracles – Secure and decentralized price feeds
- Ethereum & EVM-Compatible Chains – Deployable on various networks
Clone the repository:
git clone https://github.com/sorXCode/ChainlinkMarket.git
cd ChainlinkMarketInstall dependencies:
yarn installCompile the smart contracts:
npx hardhat compileRun tests:
npx hardhat testDeploy to a local blockchain:
npx hardhat node
npx hardhat run scripts/deploy.ts --network localhostDeploy to a testnet:
npx hardhat run scripts/deploy.ts --network ropsten