Table of Contents
- npm
npm install npm@latest -g
-
Clone the repo
git clone https://github.com/real-token/realtoken-yam-core.git
-
Install NPM packages
npm install
-
Setup a
.env
file, with the following configCoinMarketCap API Key here
Infura API Key here
Etherscan API Key here
Check .env.example
-
Check available command
npx hardhat --help
-
Deploy contract
Use this command to deploy the Yam contract using private key (replace networkId with hardhat, goerli, mainnet, gnosis)
npm run deploy:realtokenYam::networkId
or this command to deploy the Yam contract using hardware wallet via Frame (replace networkId with hardhat, goerli, mainnet, gnosis)
npm run deployFrame:realtokenYam::networkId
Hardhat Getting Started here
The contract allows sell, buy and exchange tokens between users.
The sellers can create, update and delete their offers. The buyers can buy the offer.
The contract also supports tokens with permit functionnality.
Admin can whitelist tokens which is allows to be sold via this contract. This helps to prevent listing undesired tokens.
Auditing the solidity code in an important aspect of this language, we need to be confident with the code we ship to the customer to avoid malicious attacks
A lot of the auditing have been done during the contract construction using the Solidity static analysis framework
Slither
You can download Slither and use the following command to audit the code
slither .
- YAM core contracts with basic functionnalities ✅
- Add whitelisting token functionnalities ✅
- Testing ✅
- Slither analysis ✅
- Support for Hardware Wallet ✅
- Adding more features in next versions ❌
See the open issues for a full list of proposed features (and known issues).
npx hardhat coverage
npx hardhat test
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Support - @RealTPlatform - [email protected]
Project Link: https://github.com/real-token/realtoken-yam-core
Acknowledgement: The YAM contract is inspired by the wallet2wallet DEX SwapCat.