Skip to content

Latest commit

 

History

History

migrate

InpulseX migrate

The InpulseX migration project includes the following components:

Detailed migration instructions

Step 1: Pre-migration

The InpulseX team responsible for the migration should have the latest version of Node installed. An admin private key and wallet address should be generated by InpulseX to carry out the migration process, four BNB should be sent to the "admin" wallet address. A file named .env must be created in the scripts directory with the following content:

PROVIDER=REPLACE_WITH_ARCHIVE_JSON_RPC_ENDPOINT_URL
ADMIN_KEY=REPLACE_WITH_AN_ADMIN_WALLET_PRIVATE_KEY

Step 2: Deploying the contracts

  • The new IPX smart contract should be deployed to the BNB Smart Chain mainnet.
  • The migration smart contract should be deployed to the BNB Smart Chain mainnet.
  • The setToken method of the migration contract should be called by the contract owner with the address of the newly deployed token smart contract.
  • The setAdmin method of the migration contract should be called by the contract owner with the address of the admin wallet.
  • The setSender method of the migration contract should be called by the contract owner with the address of the token contract owner.
  • The approve method of the token smart contract should be called by the contract owner with the address of the migration contract, approving the maximum quantity of v2 tokens.

Step 3: Liquidity

The InpulseX team should remove the v1 liquidity and provide liquidity for the v2 token. Since the total shrinks by 10000x in the v2 token, the removed liquidity should be paired with 10000x less v2 tokens. The InpulseX team needs to take note of the block number on which they remove the liquidity of their v1 token.

Step 4: Configuration

The config.json file in the scripts directory should be modified as follows:

  • "blockTag": Should have a value equal to the liquidity removal block number.
  • "v1TokenAddress": Should have a value equal to the v1 token contract address.
  • "migrationContractAddress": Should have a value equal to the migration contract address.

Step 5: Freeze

The InpulseX team should export account balances from BSCScan, and use csv2json to convert the output to .json format. The result should be renamed to bscScanExport.json and copied to the scripts directory. Once done, the InpulseX team should run the following command:

npm run freeze

On a successful run, a file named balances.json will be created in the scripts directory.

Step 6: Airdrop

The InpulseX team should then run the following command to perform the airdrop process:

npm run airdrop

Step 7: Post-migration

The InpulseX team should remove the remaining BNBs from the admin wallet and remove the .env file in the scripts directory.