Token Smart Contract

Background

The smart contract in this repository is part of a 15 day smart contract building challenge. The challenge has three levels of difficulty, namely:

  • Basic: The challenges from Day 1 to Day 5
  • Intermediate: The challenges from Day 6 to Day 10
  • Advanced: The challenges from Day 11 to Day 15

Challenge Task: Basic 2

Write a smart contract that can create and transfer tokens. The contract should have a mapping that stores the balances of each address. The contract should also have a function to mint new tokens and assign them to the contract owner. The contract should also have a function to transfer tokens from one address to another, only if the sender has enough balance.

Contribution

Feel free to:

  • Critique the code and send me any comment via Twitter or via Email.
  • Modify the contract to add new features or functionalities.
  • Experiment with different deployment parameters and usage scenarios.
  • Contribute to the code or suggest improvements by raising issues or pull requests.

Disclaimer:

This is provided as a basic example and should not be used in production without proper security and testing. If to be used in production, use at your own risk.

License

This contract is unlicensed.

Acknowledgments

This contract was developed and tested using Foundry, a Solidity development and testing platform.