Starter codes for getting started with Tokens Extensions. You will find code to:
- create your token
- airdrop it
- collect transfer fees if your token has this extention
- update your token (TO DO)
Clone the repo and install the dependencies.
git clone https://github.com/cryptoloutre/token2022.git
cd token2022
npm install
Open the config.ts
file and set your private key in Bytes and set the endpoint.
- Open the
tokenConfig.ts
file and fill in the infos of your token and set totrue
the extensions you want to enabled - Create your token by running
npx ts-node create.ts
- Open the
receivers.json
file and paste the list of addresses you want to airdrop to and the amounts of tokens. The file should look like this:
[
{
"address": "C7JveuVsEnkUc7FLKH9gxLpcU5zzsJ9r9AesGq6wHve",
"amount": 10
},
{
"address": "4S4b59gNHxaXUxoDmGHF6MJcE5rkEjWrDvkinEWawJqF",
"amount": 100
}
]
- Airdrop your token by running
npx ts-node mintTo.ts
If your token has transfer fees, you can collect them. To do it:
- Open the
collectTransferFees.ts
file and set themint
addresse of your token and thedestinationAddress
(where the fees will be send to) - Collect the fees by running
npx ts-node collectTransferFees.ts
TO DO...