This repository contains a Solidity smart contract for the implementation of a token called "BEAUTY" (abbrv. "BTY"). The contract includes functionalities for minting and burning tokens, as well as maintaining balances and total supply.
- The contract has public variables to store the details about the token, including its name, abbreviation, and total supply.
- It utilizes a mapping to associate addresses with token balances (
address => uint). - The contract includes a
mintfunction that takes an address and a value as parameters. This function increases the total supply by the given value and increments the balance of the sender's address accordingly. - Additionally, the contract includes a
burnfunction that works opposite to themintfunction. It accepts an address and a value as parameters, deducts the value from the total supply, and decreases the sender's balance accordingly. - The
burnfunction includes conditionals to ensure that the balance of the sender is greater than or equal to the amount intended to be burned.
To utilize this contract, follow the steps below:
- Clone the repository:
git clone https://github.com/your-username/your-repo.git - Navigate to the project directory:
cd your-repo - Compile the Solidity contract using a suitable Solidity compiler (e.g., solc). For example, using solc:
solc --versionto verify the installation andsolc --bin --abi MyToken.sol -o ./binto compile the contract. - Deploy the compiled contract using a suitable Ethereum development framework (e.g., Hardhat, Truffle). Refer to the framework's documentation for detailed deployment instructions.
- Interact with the deployed contract by invoking its functions, such as
mintandburn, passing the required parameters.
This code is released under the MIT License. See LICENSE for more information.