tact icon indicating copy to clipboard operation
tact copied to clipboard

feat(stdlib): add jetton support

Open Kaladin13 opened this issue 7 months ago • 10 comments
trafficstars

Issue

Closes #1562

Kaladin13 avatar Mar 27 '25 10:03 Kaladin13

self-ping: I'll resolve conflicts and push doc updates soon

novusnota avatar Apr 08 '25 12:04 novusnota

@Kaladin13 please fix the merge conflicts here

anton-trunov avatar Apr 09 '25 07:04 anton-trunov

Kaladin13 please fix the merge conflicts here

doing just that

UPD: 75% ready, cleaning up remaining parts UPD: ~85% UPD: ~95% UPD: DONE!

novusnota avatar Apr 09 '25 07:04 novusnota

ALL ABOARD, THE TIME HAS FINALLY COME TO REVIEW!!1!

A couple of notes:

  1. The message struct TakeWalletAddress doesn't have usage examples added because instead of using an extension function Message.toCell(), it is manually composed both in our benchmarks and in tact-lang/jetton, and the message struct itself serves merely as a reference.
  2. I've removed the default value of 0 for the queryId fields because, while convenient, nearly all benchmarks got worse: there was about 300 to 500 gas usage growth when setting the defaults for queryId!

@Kaladin13 if you want to add any messages and/or rename some fields (minter → master), this is the time to do it. Otherwise, we can keep the minter field and "Jetton Minter" terminology brought by you to this PR, as I believe is the better naming. Our benchmarks can use the old one, since they need to stay close to FunC.

novusnota avatar Apr 09 '25 21:04 novusnota

@Kaladin13 @Shvandre @skywardboundd @i582 RFC, where C = Reviews

novusnota avatar Apr 10 '25 20:04 novusnota

It was a big review. We discussed docs changes with @novusnota internally, not to lose time on github review, as I really want it to be added in 1.6.6. Great job from @novusnota and @Kaladin13 . Thank you guys!

P.S. Approve will be right here - right after changes :)

Shvandre avatar Apr 11 '25 09:04 Shvandre

It was a big review. We discussed docs changes with novusnota internally, not to lose time on github review, as I really want it to be added in 1.6.6.

Applying changes right now! :boar:

novusnota avatar Apr 11 '25 10:04 novusnota

ping @skywardboundd

novusnota avatar Apr 11 '25 11:04 novusnota

@Kaladin13 @Shvandre @skywardboundd Sorry for tagging you guys once again, but if there are any things you'd like to fix regarding to benchmarked gas usage or contract sizes, then please do.

The burn got more expensive because the upstream type of responseDestination is Address, not Address?, and therefore is incorrect. This PR fixes it, which increases its gas usage for burn relative to the last benchmark PR.

novusnota avatar Apr 11 '25 12:04 novusnota

Awaits #2734 and some better Address type...

UPD: And we might also set the Mint opcode to 0x642b7d07, see https://github.com/tact-lang/jetton/issues/125#issuecomment-2815937564

novusnota avatar Apr 11 '25 13:04 novusnota