You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm doing the swap according to the ston doc DEX v2 guide, code like this, any can help?
const client = new TonClient({
endpoint: "https://testnet.toncenter.com/api/v2/jsonRPC",
});
// swap 1 TON to TestRED but not less than 1 nano TestRED
const txParams = await router.getSwapTonToJettonTxParams({
userWalletAddress: "", // ! replace with your address
proxyTon: proxyTon,
offerAmount: toNano("1"),
askJettonAddress: "kQDLvsZol3juZyOAVG8tWsJntOxeEZWEaWCbbSjYakQpuYN5", // TestRED
minAskAmount: "1",
});
but got error:
G:\workspace\mason\gitee\banban-node-rest-server\node_modules@ton\ton\dist\client\TonClient.js:42
throw Error('Unable to execute get method. Got exit_code: ' + res.exit_code);
^
source-map-support.js:722
Error: Unable to execute get method. Got exit_code: -13
at TonClient.runMethod (G:\workspace\mason\gitee\banban-node-rest-server\node_modules@ton\ton\dist\client\TonClient.js:42:19)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.get (G:\workspace\mason\gitee\banban-node-rest-server\node_modules@ton\ton\dist\client\TonClient.js:364:26)
at async JettonMinter.getWalletAddress (G:\workspace\mason\gitee\banban-node-rest-server\node_modules@ston-fi\sdk\src\contracts\core\JettonMinter.ts:12:20)
at async Promise.all (index 1)
at async _class.getSwapJettonToJettonTxParams (G:\workspace\mason\gitee\banban-node-rest-server\node_modules@ston-fi\sdk\src\contracts\dex\v2_1\router\BaseRouterV2_1.ts:199:7)
The text was updated successfully, but these errors were encountered:
i'm doing the swap according to the ston doc DEX v2 guide, code like this, any can help?
const client = new TonClient({
endpoint: "https://testnet.toncenter.com/api/v2/jsonRPC",
});
const router = client.open(
DEX.v2_1.Router.create(
"kQALh-JBBIKK7gr0o4AVf9JZnEsFndqO0qTCyT-D-yBsWk0v" // CPI Router v2.1.0
)
);
const proxyTon = pTON.v2_1.create(
"kQACS30DNoUQ7NfApPvzh7eBmSZ9L4ygJ-lkNWtba8TQT-Px" // pTON v2.1.0
);
// swap 1 TON to TestRED but not less than 1 nano TestRED
const txParams = await router.getSwapTonToJettonTxParams({
userWalletAddress: "", // ! replace with your address
proxyTon: proxyTon,
offerAmount: toNano("1"),
askJettonAddress: "kQDLvsZol3juZyOAVG8tWsJntOxeEZWEaWCbbSjYakQpuYN5", // TestRED
minAskAmount: "1",
});
but got error:
G:\workspace\mason\gitee\banban-node-rest-server\node_modules@ton\ton\dist\client\TonClient.js:42
throw Error('Unable to execute get method. Got exit_code: ' + res.exit_code);
^
source-map-support.js:722
Error: Unable to execute get method. Got exit_code: -13
at TonClient.runMethod (G:\workspace\mason\gitee\banban-node-rest-server\node_modules@ton\ton\dist\client\TonClient.js:42:19)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.get (G:\workspace\mason\gitee\banban-node-rest-server\node_modules@ton\ton\dist\client\TonClient.js:364:26)
at async JettonMinter.getWalletAddress (G:\workspace\mason\gitee\banban-node-rest-server\node_modules@ston-fi\sdk\src\contracts\core\JettonMinter.ts:12:20)
at async Promise.all (index 1)
at async _class.getSwapJettonToJettonTxParams (G:\workspace\mason\gitee\banban-node-rest-server\node_modules@ston-fi\sdk\src\contracts\dex\v2_1\router\BaseRouterV2_1.ts:199:7)
The text was updated successfully, but these errors were encountered: