Skip to content

A tool to help you merge coins when there are too many objects that cannot be transferred or swapped for other coins

Notifications You must be signed in to change notification settings

klren0312/sui-merge-coin

 
 

Repository files navigation

SUI Merge Coins

A tool to help you merge coins when there are too many objects that cannot be transferred or swapped for other coins

Currently the version that can be used directly on SUI Mainnet

Some configurations

  • 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

Dockerfile

  • 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]

About

A tool to help you merge coins when there are too many objects that cannot be transferred or swapped for other coins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 72.8%
  • CSS 14.8%
  • HTML 6.3%
  • JavaScript 3.8%
  • Dockerfile 2.3%