I am trying to figure out how to airdrop tokens to all holders of a old tokens with a new token the exact number of tokens in their wallet?

May 26, 2021, 11:17 AM
Use the old token's address to get the balance of tx.origin in your smart contract and let them withdraw that amount of new tokens only.

And keep an address to bool mapping to keep track of the addresses which already claimed the airdrop.
May 26, 2021, 11:25 AM
Interesting, can I Dm you?
May 26, 2021, 11:26 AM
Okay
May 26, 2021, 11:27 AM
Google "solidity erc20 swap example". However, make sure to keep security measures like safemath etc.
May 26, 2021, 11:31 AM
Oh cool..thanks man..let me do that now.
Binance to binance
Yes
Ok
May 26, 2021, 11:49 AM
Please does he need safemath if he is using solidity 0.8?
May 26, 2021, 12:21 PM
If I am not wrong from 0.8.0 safemath is not needed
uniswap use it
May 26, 2021, 12:42 PM
No, from 0.8 onwards safemath is "inbuilt".
May 26, 2021, 12:42 PM
thank you very much
available
May 26, 2021, 12:51 PM
But while using solidity 0.8.x will you love to use safemath and why? Just wondering.
Thanks.
May 26, 2021, 2:56 PM
😁😁
May 26, 2021, 4:18 PM

© 2024 Draquery.com All rights reserved.