Skip to content

viktrified/kwagarelly-token

Repository files navigation

KWAG Token

Overview

KWAG (Kwagarelly Token) is an ERC-20-like fungible token implemented in Solidity. The contract allows users to transfer tokens, approve allowances, and perform delegated transfers using transferFrom.

Features

  • Token Details:
    • Name: Kwagarelly Token
    • Symbol: KWAG
    • Decimals: 18
    • Total Supply: 1,000,000 KWAG
  • Functionalities:
    • Token balance retrieval (balanceOf)
    • Token transfers (transfer)
    • Allowance approvals (approve)
    • Delegated transfers (transferFrom)
  • Custom Errors:
    • InsufficientBalance: Raised when a user tries to transfer or approve more tokens than they own.
    • InsufficientAllowance: Raised when a spender attempts to transfer tokens beyond the approved amount.
  • Events:
    • Transfer: Emitted on successful transfers.
    • Approval: Emitted on successful approvals.

Deployment

Ensure you have Hardhat installed and configured.

npx hardhat compile
npx hardhat test
npx hardhat run scripts/deploy.js --network <network>

Testing

The contract is fully tested using Hardhat and Chai. The test cases cover:

  • Deployment validation (owner, total supply, token metadata)
  • Balance checks
  • Transfers and failed transfers
  • Approvals and allowances
  • TransferFrom operations and failure cases

To run tests:

npx hardhat test

License

This project is licensed under the UNLICENSED SPDX identifier.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published