We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
participant_list
For example, participant_list method of the elector contract:
import { LiteClient, LiteRoundRobinEngine, LiteSingleEngine } from 'ton-lite-client'; import { Address } from '@ton/core'; const liteAddr = 'tcp://change-me'; const liteKey = 'some-key'; const client = new LiteClient({ engine: new LiteRoundRobinEngine([ new LiteSingleEngine({ host: liteAddr, publicKey: Buffer.from(liteKey, 'base64'), }), ]), }); const result = await client.runMethod( Address.parse('-1:3333333333333333333333333333333333333333333333333333333333333333'), 'participant_list', [], (await client.getMasterchainInfo()).last, ); console.log('result', result.exitCode, result.result);
Returns:
result -14 te6ccgEBAgEAEQABGAAAAQEAAAAAAAST7gEAAA==
Same method called with ton-http-api works fine:
curl -X POST https://toncenter.com/api/v2/runGetMethod -H "Content-Type: application/json" --data '{ "address": "-1:3333333333333333333333333333333333333333333333333333333333333333", "method": "participant_list", "stack": [] }'
Outputs:
{ "ok": true, "result": { "@type": "smc.runResult", "exit_code": 0, "gas_used": 321142, "stack": [ [ "list", { "@type": "tvm.list", "elements": [...]
Originally posted by @ingria in ton-core/ton-lite-client#18
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For example,
participant_list
method of the elector contract:Returns:
Same method called with ton-http-api works fine:
Outputs:
Originally posted by @ingria in ton-core/ton-lite-client#18
The text was updated successfully, but these errors were encountered: