Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to execute get method. Got exit_code: -13 #44

Open
mianshenglee opened this issue Nov 25, 2024 · 0 comments
Open

Unable to execute get method. Got exit_code: -13 #44

mianshenglee opened this issue Nov 25, 2024 · 0 comments

Comments

@mianshenglee
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant