Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i get tx details like in tonview page ? #264

Open
byte1023 opened this issue Sep 27, 2024 · 5 comments
Open

how can i get tx details like in tonview page ? #264

byte1023 opened this issue Sep 27, 2024 · 5 comments

Comments

@byte1023
Copy link

byte1023 commented Sep 27, 2024

hi, i wanna get the tx details like in the tonview page , here is my code, but that return error.

// i got the raw in https://tonviewer.com/transaction/e8bede202c2640abd0d21829abda2c3bf84d001876614897fe587fed02d8a4af?section=trace `Raw body` button
raw := "b5ee9c7201010201008700019c6c873f33fd68f48129591db54dbec3eb73d23517c75e0190287136911bf79a8b1e14402e9546f59ef830173fac05dd283de3799e57f2cd824049e21cb265250f29a9a31766f527ce0000002300030100684200783f5983559094d26b757d065658e840dd5d3da401668501ab241bfa078f80bea1dcd6500000000000000000000000000000"
rawBytes, err := hex.DecodeString(raw)
if err != nil {
	log.Error(err)
	return
}
c, err := cell.FromBOC(rawBytes)
if err != nil {
	log.Error(err)
	return
}

var msg tlb.Message
err = msg.LoadFromCell(c.BeginParse())
if err != nil {
	log.Errorf("parse:%v",err) // error here
	return
}
log.Infoln(msg)

log file here:
2024/09/27-15:18:08.464267 [main.:0040][GOID:00000001][ERROR] parse:failed to parse internal message: failed to load CreatedLT uint 64, err: not enough data in reader, need 64, has 39

@xssnick
Copy link
Owner

xssnick commented Sep 27, 2024

Hi, raw body is not tlb.Message, it just depends on specific contract, so you should know the contract scheme

@byte1023
Copy link
Author

Hi, raw body is not tlb.Message, it just depends on specific contract, so you should know the contract scheme

thanks for your response. This tx seems like just normal transfer transaction, how can i parse it?

@byte1023
Copy link
Author

image

@qiwenzhou
Copy link

Hi! Is there a solution? Need badly

@wythers
Copy link

wythers commented Nov 19, 2024

image

Bro, That all are your payload msg, magic header, and signature, organized by you and the lib, not returned by TON except for the TX hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants