Enable Sui -> Any manual exec#107
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
8bb8add to
e571c3a
Compare
Coverage Report |
5357f3c to
07ea3f6
Compare
07ea3f6 to
e9530a4
Compare
e9530a4 to
4d087c4
Compare
4d087c4 to
d5ad1f9
Compare
546c0c9 to
4bfc4ca
Compare
| const packageId = address.replace(/::onramp$/, '') | ||
| const target = `${packageId}::onramp::type_and_version` |
There was a problem hiding this comment.
You shouldn't assume ::onramp: this method should be generic, and work with any suffix handled to it; this way, we can identify a ::router or an ::offramp, like on Aptos:
ccip-tools-ts/ccip-sdk/src/aptos/index.ts
Line 287 in 61a9054
What we should do instead is, ensure every address WE keep anywhere and hand to sui.typeAndVersion() has the module suffix; the only place when/where we should handle non-suffixed addresses/packageId is when we receive them from users, but there we usually know what the user wants (e.g. a sendMessage call is probably expected to call the ::router at that packageId, but even then, if user explicitly passed a suffixed address, we should honor it)
| const packageId = address.replace(/::onramp$/, '') | |
| const target = `${packageId}::onramp::type_and_version` | |
| const target = `${address}::type_and_version` |
fromSui messages