-
Notifications
You must be signed in to change notification settings - Fork 8
Implement TON hasher #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Coverage Report |
andrevmatos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Some heads-up and nits, but overall, looking great for the new pattern! Ty!
| | (EVMExtraArgsV2 & { _tag: 'EVMExtraArgsV2' }) | ||
| | (SVMExtraArgsV1 & { _tag: 'SVMExtraArgsV1' }) | ||
| | (SuiExtraArgsV1 & { _tag: 'SuiExtraArgsV1' }) | ||
| | (GenericExtraArgsV2 & { _tag: 'GenericExtraArgsV2' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should still name this EVMExtraArgsV2; the _tag alias isn't of much use since this is actually the same type; trying to union it even makes TS complain (as above)
| readonly network: NetworkInfo<typeof ChainFamily.TON> | ||
|
|
||
| constructor(network: NetworkInfo<typeof ChainFamily.TON>) { | ||
| super() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a heads-up: #70 changes slightly constructor/super call, passing network to super, plus some context/logger objects; should be trivial to adapt
| async getWalletAddress(_opts?: { wallet?: unknown }): Promise<string> { | ||
| return Promise.reject(new Error('Not implemented')) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is going away as well
| * @param args - Extra arguments containing gas limit and execution flags | ||
| * @returns Hex string of BOC-encoded extra args (0x-prefixed) | ||
| */ | ||
| static encodeExtraArgs(args: ExtraArgs): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI, encode/decodeExtraArgs are from the perspective of this source chain, to other chains; if TON is expected to send only to EVM at first, then it's fine to implement only EVMExtraArgsV2 encoding here; but if it's expected soon to support lanes to Solana, etc, you may also want to have serializations (with TON's codecs) of extraArgs to those chains
| return Promise.reject(new Error('Not implemented')) | ||
| } | ||
|
|
||
| async sendMessage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads-up: #70 also include some new methods, generateUnsigned*; again, should be trivial to add the Not implemented versions just to satisfy the interface
No description provided.