-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
Description:
I got an error when trying to get jetton data with this function:
async getJettonData(provider: ContractProvider) {
let res = await provider.get('get_jetton_data', []);
let totalSupply = res.stack.readBigNumber();
let mintable = res.stack.readBoolean();
let adminAddress = res.stack.readAddress();
let content = res.stack.readCell();
let walletCode = res.stack.readCell();
return {
totalSupply,
mintable,
adminAddress,
content,
walletCode
};
}The problem is that the proxy ton (EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez) does not have an admin address, so I encounter the error:
Error: Invalid address: 0
Steps to Reproduce:
Call the function with the jetton address EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez.
Solution:
Use let adminAddress = res.stack.readAddressOpt(); instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels