tonutils-go icon indicating copy to clipboard operation
tonutils-go copied to clipboard

I want to scan the block and parse the transactions of the specified contract in the block. Is there a demo?

Open ghost opened this issue 1 year ago • 6 comments

ghost avatar Nov 10 '24 15:11 ghost

😂

ghost avatar Nov 12 '24 03:11 ghost

Hi, yes, you can use this example https://github.com/xssnick/tonutils-go/blob/master/example/accept-payments/main.go

It reports every contract's tx to the channel

xssnick avatar Nov 12 '24 07:11 xssnick

@xssnick why can't I set the contract to: UQBAjaOyi2wGWlk-EDkSabqqnF-MrrwMadnwqrurKpkla4QB

ghost avatar Nov 13 '24 11:11 ghost

我想我已经拿到我想要的了,谢谢你,但是我仍然有一些问题:

type Cell struct {
	special   bool
	levelMask LevelMask
	bitsSz    uint
	data      []byte

	hashes      []byte
	depthLevels []uint16

	refs []*Cell
}

the data I want is in data, which contains transaction information. How should I obtain and parse it?

ghost avatar Nov 13 '24 12:11 ghost

see readme, ton docs and examples, load cell similar to how it happens in contract (.BeginParse()) or map data to struct with tlb tags

xssnick avatar Nov 14 '24 06:11 xssnick

你好,是的,你可以使用这个例子https://github.com/xssnick/tonutils-go/blob/master/example/accept-payments/main.go

它将每个合约的交易报告给渠道

Is it necessary to set treasuryAddress? I want to listen to all transfers to this contract EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs.

g3m0sis avatar Sep 17 '25 06:09 g3m0sis