Case Study: Poolz Integration with TomoChain Testnet
So far, Poolz has its contract deployed on Ethereum’s testnet, Rinkeby. Similarly, for our integration with TomoChain, our first step was to deploy Poolz contract on the TomoChain Testnet.
As it is with any deployment on the blockchain, we needed funds on the testnet before we could deploy the Poolz contract. We used a MetaMask wallet to get the funds for our deployment on the TomoChain testnet.
You can find more information about getting TomoChain testnet funds into your wallet here: https://docs.tomochain.com/developer-guide/working-with-tomochain/tomochain-testnet
Once we received the funds in our wallet, we updated the “truffle-config.js” with the wallet data (and the chain) so we can take forward the contract deployment process.
The mnemonic was made with the help of this Mnemonic Code Converter as we wanted to use a “fresh” code to secure our account. Following that, we run [truffle migrate — network tomotestnet — dry-run] to get an estimate of the funds we needed for contract deployment.
Now we know that we need to use the FAUCET seven times.
We then went to https://faucet.testnet.tomochain.com/ and input the amount of testnet TOMO coin we needed. After receiving the amount in our wallet, we run [truffle migrate — network tomotestnet].
Once it is done, we receive a summary like this:
> Total deployments: 4
> Final cost: 101.81733 ETH
On the completion of the process, we received 4 contracts, the migration information, the Poolz contract, TestToken to test the system, and TestMainToken to conduct further tests.
You can check out our contract here:
With this, we had our back-end ready. In the front-end of the application, we needed to direct the data flow to the right chain. For this, we had sorted and placed all the configuration in one place:
The mainCoinInfo is the reason we received TOMO and not ETH in the Truffle result (we use address ZERO to address it). To give our users the best possible experience, we added the TomoChain icons. In the TomoTestChainConfig we share the information to connect to the right place:
- address: ‘wss://ws.testnet.tomochain.com’,
- networkId: 89,
- chainId: 89,
- poolzAddress: ‘0x6a2F63f63DC8EC7a976A236B5fa135FBB4e14028’,
That’s the basic process of integrating Poolz to TomoChain. There’s more, but that’s the boring (or really interesting??) tech stuff.
With the integration of Poolz with TomoChain, you can migrate your DApps from Ethereum to TomoChain with ease. The migration of Ethereum DApps to TomoChain will bring more scalability to the apps and reduce the cost of operation. Now is the time to leverage the potential of blockchain interoperability and attract a wider audience for your projects. Now is the time to bring your Dapps to TomoChain and increase their potential multifold.
To stay updated on the progress of Poolz:
Telegram Announcements: https://t.me/Poolz_Announcements
Our live code on Discord: https://discord.gg/xwtWw4sGPp
Contact: Liam Cohen, CMO- Liam@poolz.finance