Open 0kenx opened 5 months ago
Why does Tact generate the following FunC code:
slice __tact_verify_address(slice address) inline { throw_unless(136, address.slice_bits() == 267); var h = address.preload_uint(11); throw_if(137, h == 1279); throw_unless(136, h == 1024); return address; }
Wouldn't that always fail when chain ID != 0 when in the future some addresses are from a different chain ID?
chain ID != 0
It should just generate
- throw_unless(136, h == 1024); + throw_unless(136, h >> 8 == 2);
@0kenx Would you like to open a PR and contribute this change?
I can fix this single instance, but I believe a more systematic review of the codegen is necessary.
Yep, codegen review is planned actually
Why does Tact generate the following FunC code:
Wouldn't that always fail when
chain ID != 0
when in the future some addresses are from a different chain ID?It should just generate