Closed worker-droid closed 6 months ago
Hi, this is corrupted BoC with recursive reference (reference to itself and infinity depth), it must not work, so it is probably a bug in tongo.
For example this is TON Node output of trying to deserealize this boc:
Unexpected Status [Error : 0 : invalid bag-of-cells failed to deserialize cell #20 [Error : 0 : bag-of-cells error: reference #1 of cell #20 is to cell #20 with smaller index]]
Hm, yes, it seems so.
Corrupted BoC comes from ton-core ts library
const contract = WalletContractV4.create({ workchain: 0, publicKey: Buffer.from('MUP3GpbKCQu64L4PIU0QprZxmSUygHcaYKuo2tZYA1c=', 'base64') });
let init = beginCell()
.storeWritable(storeStateInit(contract!.init))
.endCell();
let s = init
.toBoc({ idx: true, crc32: true })
.toString('base64')
console.log(s)
If idx: true
is set to idx: false
everything works fine.
Thank you, closing issue.
Hello. I get error
Failed to parse payload: recursive reference of cells
when deserializing stateinit from mytonwallet (ton connect). Error occurs on the callcell.FromBOC
. I believe this is a bug, because I was able to successfully parse this stateinit using tongo library as shown in the example.Tonutils version: v1.8.9
Example: