ProvableHQ / sdk

A Software Development Kit (SDK) for Zero-Knowledge Transactions
https://provable.tools
GNU General Public License v3.0
584 stars 468 forks source link

[Bug]The SDK is not functioning properly in the latest Testnet Beta #888

Open YaakovHuang opened 2 months ago

YaakovHuang commented 2 months ago

๐Ÿ› Bug Report

When I try to use SDK v0.6.9 in Testnet Beta to request the latest block height and query the balance of my account, it reports an error. The same code works fine on Testnet3.

Steps to Reproduce

Code snippet to reproduce

async function testnet() {
  const connection = new AleoNetworkClient("https://api.explorer.aleo.org/v1/testnet");

  const latestHeight = await connection.getLatestHeight();
  console.log(`# latestHeight = `, latestHeight);

  const mappings = await connection.getProgramMappingNames("credits.aleo");
  console.log(`# mappings = `, mappings);

  const public_balance = await connection.getProgramMappingValue("credits.aleo", "account", "aleo10aju84jkxnvuw47qanfffnnzphwujsc803cqt6g237dq9a785qxq7zsqhf");
  console.log(`# balance = `, public_balance);

}

Stack trace & error message

Error: Error fetching latest height.
Error: Error fetching program mappings - ensure the program exists on chain before trying again

Your Environment

ldbfpiaoran commented 2 weeks ago

่ชฐใ‚‚๏ผŸ ๅ…จๅ“กๆญปใ‚“ใงใ‚‹๏ผŸ ใใ‚Œใจใ‚‚ใฟใ‚“ใชใŠ้‡‘ใ‚’้จ™ใ™ใฎใซๅฟ™ใ—ใ„ใฎใงใ—ใ‚‡ใ†ใ‹๏ผŸ