This project is a smart contract for swapping ERC20 tokens, implementing the following interface:
interface ERC20Swapper {
/// @dev swaps the `msg.value` Ether to at least `minAmount` of tokens in `address`, or reverts
/// @param token The address of ERC-20 token to swap
/// @param minAmount The minimum amount of tokens transferred to msg.sender
/// @return The actual amount of transferred tokens
function swapEtherToToken(address token, uint minAmount) public payable returns (uint);
}
To get started with this project, follow these steps:
- Clone the repository.
- Install the necessary dependencies.
- Compile the smart contract.
- Deploy the smart contract.
The smart contract has been deployed to the Sepolia testnet and can be viewed on Etherscan here.
This project is licensed under the MIT License - see the LICENSE file for details.