Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
5 years, 3 months ago
This question already has answers here:
5 years ago.
How could I create a new smart contract token and copy the balance of every address from an old contract.
Essentially fork a contract.
I want to make this a one time function in the contract so that it can only be called once. Or even better do it during the contract creation.
Feb 21, 2018 at 21:46
141 8 8 bronze badges
You can create a new contract with method to get every addresses in the token contract, then you can just copy it to your own array of address and then just call balanceOf function and get the balance of all your new address accounts. It's simple if you are copy a erc20 token.
Feb 21, 2018 at 22:17
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only