Open 0x0liver opened 6 months ago
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.
let adminAddress = res.stack.readAddressOpt();
Same here. I agree with the solution proposed here
Description:
I got an error when trying to get jetton data with this function:
The problem is that the proxy ton (EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez) does not have an admin address, so I encounter the error:
Steps to Reproduce: Call the function with the jetton address EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez.
Solution: Use
let adminAddress = res.stack.readAddressOpt();
instead.