Hi guys, I'm reading ton-nominators smart contract, from tonwhales, and have a doubt about what this number means. I'll share the link to the line here:

https://github.com/tonwhales/ton-nominators/blob/0553e1b6ddfc5c0b60505957505ce58d01bec3e7/sources/modules/utils.fc#L195

The code is like this, in the parse_text_command function we have the different checks for the messages, and for example in the check for Deposit, there is this check with a magic number.

throw_unless(error::unknown_text_command(), in_msg~load_uint(48) == 111533580577140); ;; eposit

I imagine the idea is to check if the message is Deposit right? and they are checking for the eposit part here. My doubt is how is that this magic number 111533580577140 translate into eposit.

May 21, 2023, 9:52 AM
Convert this magic value to Hex and check every byte against ASCII table for “eposit” letters. I guess it should match…
May 21, 2023, 9:59 AM
Yep, that number translate into eposit in that way. Thanks
May 21, 2023, 10:05 AM

© 2024 Draquery.com All rights reserved.