This article contain detail guide about how to migrate PLS on old network to new Ethereum ERC-20 Token, there are two kinds of balance holders, ones who already claimed their balance to PLAY 2.0 and have related binding accounts, another one is those who have not claimed their balance to PLAY 2.0 balance yet and should have backup wallet files such as PLAY 0.5.0 export file, BTS wallet file, etc, for the second case, user need to import and claim their balance in to a registered account(can be created with the help of web wallet and faucet), and then follow the web wallet instructions to migrate.
Before give the informations about how to migrate, the ERC-20 parameters of the PLS token is as following:
Token Address: 0xe43ac1714F7394173b15E7CfF31A63d523Ce4fB9
Token Symbol: PLS
Token Decimal: 18
A. For ones who want to migrate your balance in PLAY 2.0 accoutns using web wallet, go to:
After you open the web wallet page, there will be an instruction header inform the details of migrations, then you can click and go to the migration page, the account with balances will be listed there, which you can select and then input the Ethereum address you want to hold the migrated PLS tokens.(Make sure you have the private key for the new Ethereum address, DO NOT use ethereum address from third-parties e.g. exchanges.)
After clicking of the migration, you will be asked to sign the migrate transaction which will be broadcast to the network later. The migration records will be recorded on PLAY 2.0 blockchain, but the new PLS Token will not show up in your address right way since this is not atomic swap. There is a automatic serve demon listening to the new migration events and do migration accordingly on Ethereum network. The migration progress could take up to 7 days, so please be patient and wait to check the PLS token balance in your Ethereum address a week later.
This migration process will be kept for long term util no users need to migrate, after that, small amount fees of PLS might be charged for migration.
If you are not familar with Ethereum network, etherscan.io is a good explorer for you to check your migrated PLS balance.
B. For ones who do not have claimed balance in you account, you need to first do account balance claim using web wallet's settings/restore&import, then follow the steps of A part.
Tip: It is possible that you have already claim the balances before, so please make sure you have not claim and migrate before.
Here is the steps of account blance claim for old versions, go to the page of Settings --> Settings/Restore&Import, there are 4 kind of format for import:
1. Wallet backup file format(.bin file)
This is the wallet back up format for PLAY 2.0 wallet, if your format is this, just import it.
2. Private key in WIF format
This is for advance users who know how to export private key from old versions, be sure that the private key is in WIF format, and have related balance in related public key address. WIF format keys should start with number 5.
3. The json export file exported from client with version 0.5.0.
Please note that the json file is *NOT* the file exported using wallet backup button, actrully it is exported using the *wallet_export_keys* command from command line gui in 0.5.0 client. The suggestion is to use the wallet_export_keys command to export the json file first and then use the web wallet to restore&import here.(make sure you have not claim from 0.5.0 before.)
here is the wallet_export_keys command help documents:
>> help wallet_export_keys
wallet_export_keys <json_filename> Exports encrypted keys to a JSON file
Exports encrypted keys to a JSON file
json_filename (filename, required): the full path and filename of JSON file to generate
4. Brain wallet.
Same with restore/import format 1, just another different 2.0 backup format.
C. For those backups older format(0.5.0 backup, BTS etc.), please download the 0.5.0 client from the website, and enter your local account > client "Keys" Tab, you will see the 0.5.0 wallet import page where you can import older formats.
Sometimes you could meet the dilemma of having no local account especially in the case new install 0.5.0 client, and because the 0.5.0 has stop running and generating blocks, so there is no way to create account here(exceptions will popup and return). In this case, you can resolve it by creating a local account using command *wallet_create_account*. Here is the help document for wallet_create_account:
>> help wallet_create_account
wallet_account_create <account_name> Add new account for receiving payments
Add new account for receiving payments
account_name (account_name, required): the name you will use to refer to this receive account
aliases: wallet_create_account, create_account
After the local account created, you can go to the Keys Tab of the account to import older formats.
In short, this guide decribe the details about how to migate smoothly, if you meet problems which not included here, stay tured or mail to info#dacplay.org.
Finally, those who are intetested the game development using play-dapp framework and token, there will be an demo on mainnet delopyed for playing with in next month approximately. Here is a preview of testcase codes:
返回TokenUser user1 = new TokenUser(pls, betGame); TokenUser user2 = new TokenUser(pls, betGame); pls.mint(address(user1), 10000); pls.mint(address(user2), 10000); // console.log(abi.methodID('startRoundWithFirstBet', [ 'uint256', 'uint256', 'uint256', 'bytes32' ]).toString('hex') + abi.rawEncode([ 'uint256', 'uint256', 'uint256', 'bytes32' ], [ "2", "100", "100", "0xd4c1926f4e6406b47216b65d7b4737d133996f3bfb929bf785d4c29731068268" ]).toString('hex')); user1.transfer(address(betGame), 1000, hexStrToBytes("0x21067b3f000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064d4c1926f4e6406b47216b65d7b4737d133996f3bfb929bf785d4c29731068268")); assertEq(betGame.roundCount(), 2); assertEq(betGame.betCount(), 1); // with secret 0, true, 14 // console.log(abi.methodID('betWithRound', [ 'uint256', 'bytes32' ]).toString('hex') + abi.rawEncode([ 'uint256', 'bytes32' ], [ "1", "0xf90ae7e1cc996f1b334ff1e3411f0fdbc47abc8b9d65f3d9f91e9a3c14b8b979" ]).toString('hex')); user2.transfer(address(betGame), 1000, hexStrToBytes("0x38b9ef9c0000000000000000000000000000000000000000000000000000000000000001f90ae7e1cc996f1b334ff1e3411f0fdbc47abc8b9d65f3d9f91e9a3c14b8b979")); assertEq(betGame.betCount(), 2); assertTrue(betGame.revealBet(0, 0, false, 13)); assertTrue(betGame.revealBet(1, 0, true, 14)); assertTrue(betGame.betRevealed(1)); betGame.finalizeRound(1); assertEq(pls.balanceOf(address(user1)), 9000); assertEq(pls.balanceOf(address(user2)), 9000); user1.withdraw(); user2.withdraw(); // user2 win the game... assertEq(pls.balanceOf(address(user1)), 9000); assertEq(pls.balanceOf(address(user2)), 11000);