sentioxyz / typemove

Generate TypeScript bindings for Move contracts
Apache License 2.0
28 stars 4 forks source link

Codegen on packages with a leading 0 have incorrect TYPE_QNAME for objects on SUI #76

Closed nithilan4 closed 9 months ago

nithilan4 commented 9 months ago

When I generated a codegen for package: 0x02dab35... The corresponding TYPE_QNAME for all objects within it included 0x2dab354.., which is missing the leading 0.

I explored a little bit and the issue seems to actually be within the SuiClient, where calling await suiClient.getNormalizedMoveModulesByPackage({ package: "0x02dab35..." }) returned an ABI where all the addresses had the incorrect 0x2dab354....

nithilan4 commented 9 months ago

I've created an issue on the Sui repo here: https://github.com/MystenLabs/sui/issues/16083

zfy0701 commented 9 months ago

yeah, there are a lot of inconsistent for this

I think the rule here is for type name, it's always without leading zero, e.g. you will see 0x1::xx::yy, not 0x000....01::xx::yy and in the context of address, then it's always have leading zero

nithilan4 commented 9 months ago

interesting, thanks for explaining. feel free to close if you want.