「📝」 doc(USAGE): added usage doc
This commit is contained in:
@ -5,17 +5,17 @@ Made using foundry-rs toolkit.
|
||||
|
||||
## Why ??
|
||||
- EVM compatible : this is the biggest standard when it comes to smart contract and is widely available in multiple chains
|
||||
- Made in Solidity : the most common languange for smart contract and has plenty of documenation available
|
||||
- Made in Solidity : the most common languange for smart contract and has plenty of documentation available
|
||||
- Following the ERC20 standard : the most used standard when it comes to fungible token and compatible with every wallet
|
||||
- foundry-rs : A simple but yet cli tool kit for Solidity developement with integrated fuzzer and test perfect for a simple project as this
|
||||
|
||||
## Documentation
|
||||
- [How it works](documentation/HOWITWORK.md)
|
||||
- [How to use it](USAGE.md)
|
||||
- [How to use it](documentation/USAGE.md)
|
||||
|
||||
## Some resource for more information
|
||||
[ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20) \
|
||||
[Solidity documenation](https://docs.soliditylang.org/en/v0.8.28/) \
|
||||
[Solidity documentation](https://docs.soliditylang.org/en/v0.8.28/) \
|
||||
[foundry-rs](https://getfoundry.sh) \
|
||||
[Avalanche](https://www.avax.network/) \
|
||||
[Ethereum](https://ethereum.org) \
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
Reference in New Issue
Block a user