vana-com / vana-dlp-chatgpt

Data liquidity pool for ChatGPT
5 stars 6 forks source link

Unable to transfer DLPT tokens #60

Closed pvsairam closed 1 month ago

pvsairam commented 1 month ago

I am trying to transfer DLPT (Contract address - 0x154bA8E1C1Fa293cF0358040209fc28982378d4d) tokens to another wallet and it is getting failed due to below error:

image

image

Error: An internal error was received.

Details: Internal JSON-RPC error. Version: viem@2.10.9

volod-vana commented 1 month ago

This is happening because you need to mint those tokens and approve before transfer. See this snippet from the deployment script for better understanding.

await dlpt.connect(deployer).mint(deployer.address, parseEther('10000000'));
...
await dlpt.connect(deployer).approve(dlp, parseEther('3000000'));
await dlp.connect(deployer).addRewardForValidators(parseEther('2000000'));
await dlp.connect(deployer).addRewardsForContributors(parseEther('1000000'));
await dlpt.connect(deployer).transfer(ownerAddress, parseEther('7000000'));

Other way arround this is that you might transfer those tokens from the deployer address, e.g. 0xF9810b951d45D19754435D8e44b7761aA1635D72

Hope that helps, if not let me know.

pvsairam commented 1 month ago

I am trying to transfer tokens using deployer address but it is not getting through:

image

Error - Internal JSON-RPC error.

image

pvsairam commented 1 month ago

I have re-added the network, and the issue is resolved!