xssnick / tonutils-go

TON SDK Library in pure Golang for interacting with The Open Network ecosystem using native protocols, such as ADNL, RLDP and etc.
Apache License 2.0
464 stars 95 forks source link

Question about BuildTransferPayload #205

Closed restoreall closed 2 months ago

restoreall commented 2 months ago

Hi all, I have a question about jetton message. If I have a cell that contains lots of additional payload, when I use BuildTransferPayloadV2, cell will be parsed and every data will be appended to the msg_body.

https://github.com/xssnick/tonutils-go/blob/c0b96b23fd9b5b5bdc683dfc019a1c4a324174fb/tlb/loader.go#L558

It may caused cell overflow error. So Im confused why not use store_ref() to store cell? or maybe I have a wrong thinking?

Thanks for everyone's answer.

xssnick commented 2 months ago

Hi, store builder is more flexible, if your payload is small and you dont need a ref, your transaction will be cheaper, if you have big payload, you can just wrap your data in a ref before call, the it will be same as store ref, just pass cell.BeginCell()lMustStoreRef(payload)

restoreall commented 2 months ago

Understand. Thanks for your helping.