The TokenSwap project is a blockchain-based initiative that allows for the seamless swapping of tokens. It involves two ERC-20 compliant tokens. This project employs smart contracts deployed on the Ethereum network and is developed using Solidity, along with the Hardhat development environment.
- 🔄 Token Swapping: Enables the exchange of TransferToken for MintableToken and vice versa.
- 🛠️ Flexible Fee Structure: Offers adjustable fee structures for both minting and transferring tokens.
- 🌐 Decentralized: Runs on the Ethereum blockchain, ensuring transparency and security.
- 🔒 Owner Privileges: Allows the owner to grant roles and adjust fee structures.
- Solidity
- Hardhat
- Ethers.js
- Chai
- Node.js >= 14.0.0
- npm >= 6.0.0
- Hardhat
- Clone the repository:
git clone https://github.com/maxion-tech/token-swap-contracts.git
- Navigate to the project directory:
cd token-swap-contracts
- Install the dependencies:
npm install
- Compile the contracts:
npx hardhat compile
- Deploy the contracts to the local Hardhat network:
npx hardhat run scripts/deploy.js --network localhost
To run the test suite, use the following command:
npx hardhat test
- ERC20MintableBurnable: Defines the basic ERC-20 compliant token with additional mint and burn functionalities.
- TokenSwap: The main contract that handles the token swapping logic, rate adjustments, and fee implementations.
Distributed under the MIT License. See LICENSE
for more information.