「📝」 doc(USAGE): added usage doc

This commit is contained in:
KeyZox committed 2025-08-10 16:28:19 +02:00
1 parent d0293b85a6
commit 922f8b65fd
3 files changed
+17 -5

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@
This is a ERC20 token so it has all the function you would expect from it.
The getters :
The getters:
```Solidity
// to get the full name of the token (in this case Kanel42)
function name() public view returns (string)
@@ -20,7 +20,7 @@ function balanceOf(address _owner) public view returns (uint256 balance)
function allowance(address _owner, address _spender) public view returns (uint256 remaining)
```
The member functions :
The member functions:
```Solidity
// to transfer tokens to another address (_to)
function transfer(address _to, uint256 _value) public returns (bool success)
+12
View File
@@ -0,0 +1,12 @@
# Usage
Because it is a ERC20 token you can use it with any wallet that support the standard, like MetaMask, Rabby, and a lot more...
## Mint it
You can call the function `mint(uint256)` and giving it a number of token (in *10^decimals). And then you will be credited with the corresponding tokens.
## To use it
You can make transfer it and check your balance via any wallet ERC20 compatible. You can also send an `approve(address _spender, uint _value)` to approve another address to send on your behalf, so they can use `transferFrom(address _from, address _to, uint256 _value)` to make transfer from your address. \
You can also check if transfer or approval occurs via the corresponding events.