- Mainnet: https://sui-merge-coin.cosilabs.com/
A tool to help you merge coins when there are too many objects that cannot be transferred or swapped for other coins
- Building on React, TypeScript and Vite
- Use packages @mysten/sui.js and @mysten/wallet-kit
- Some components of the user interface: react-awesome-button and react-loading
Currently the version that can be used directly on SUI Mainnet
- Any changes will be made at
/src/App.tsx
- Change the environment ('mainnet' | 'testnet' | 'devnet' | 'localnet') or custom RPC
const client = new SuiClient({
//Custom RPC can be used here. Replace getFullnodeUrl('mainnet') by 'http://your-custom-rpc.com'
url: getFullnodeUrl('mainnet'),
});
- Number of objects that want to get each time querying to the network. Currently, if you enter greater than 50, the network still only returns no more than 50 objects for a query, but it must be limited to avoid the case that the network will return more than 50 later, it will be out of control.
const objectListResponse = await client.getCoins({
owner: wallet.currentAccount.address,
coinType: selectedCoin,
cursor: cursor,
limit: 100
});
- Change the number of concurrently mergeable objects in a transaction, must be divisible by 100 or the limit number changed above
if (coinObjectIds.length >= 500) { cursor = null; }
- Let's discover the rest
- Create an extra Dockerfile to easily build and run
docker build -t [image_name] .
docker run -d --restart=unless-stopped -p 80:80/tcp --name [container_name] [image_name]