ERC-20 S.C.s
The ZCN Token Smart Contract is an ERC-20 token built for the Züs blockchain ecosystem. It follows the ERC-20 standard while incorporating key features such as custom decimals, controlled minting, and allowance management.
The contract is built using OpenZeppelin’s secure and tested libraries, ensuring interoperability with wallets, exchanges, and decentralized applications (dApps).
Contract Overview
Token Name: Configurable (set during deployment)
Symbol: Configurable (set during deployment)
Decimals: 10 (instead of the default 18)
Initial Supply: 500,000,000 ZCN
Total Supply: Can be increased via minting by the contract owner
Minting: Restricted to the owner
Allowance Management: Includes
increaseApproval()
for backward compatibilityStandard Functions: Implements all ERC-20 functions such as
transfer
,approve
,allowance
, etc.
Smart Contract Code
Key Features
1. ERC-20 Compliance
This contract follows the ERC-20 standard, meaning it supports:
transfer()
: Allows token transfers between users.approve()
: Grants spending permission to another address.allowance()
: Checks the approved spending limit.transferFrom()
: Executes transfers on behalf of a user.
2. Custom Decimals
Unlike the default 18 decimals in ERC-20, this token has 10 decimals:
This allows for finer precision in transactions.
3. Minting New Tokens
Only the contract owner can mint new tokens:
Use case:
This function can be used for staking rewards, governance incentives, or controlled token supply expansion.
4. Increased Allowance Function (increaseApproval
)
increaseApproval
)Provides backward compatibility for older ERC-20 implementations:
This function allows adjusting allowances without resetting them, which is useful in older DeFi applications.
Deployment & Usage
1. Deploying the Contract
To deploy the contract, provide the token name and symbol:
2. Interacting with the Contract
Minting New Tokens
✅ Mints 1,000 ZCN tokens.
Transferring Tokens
✅ Transfers 500 ZCN to the recipient.
Approving a Spender
✅ Allows spender to transfer up to 200 ZCN on behalf of the owner.
Checking Balance
✅ Returns the token balance of a user.
Using increaseApproval
✅ Increases allowance by 50 ZCN.
Use Cases
Utility Token: Used for transactions, fees, and governance within the Züs ecosystem.
DeFi & Staking: Can be used in staking, farming, and liquidity pools.
Token Bridging: Supports cross-chain transfers between Ethereum and Züs.
The ZCN ERC-20 Smart Contract is designed for efficiency, security, and seamless integration within the Züs ecosystem. It offers controlled minting, customized decimals, and standard ERC-20 functions, ensuring compatibility with DeFi applications, wallets, and exchanges.
Last updated