sdk
sdk copied to clipboard
[Bug]The SDK is not functioning properly in the latest Testnet Beta
🐛 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
- Sdk v0.6.9
- Testnet Beta