-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add N3 examples of MessageBridge usage in JS #7
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
| const nonce = await evmMessageBridge.connect(evmSender) | ||
| .sendExecutableMessage(rawMessage, storeResult, {value: sendingFee, maxFeePerGas, maxPriorityFeePerGas}); | ||
|
|
||
| // Wait until the message arrives on N3... |
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.
Maybe we could add some wait functionality to the bridge-sdk-ts that allows to just wait here checking the events on the destination chain for the message's nonce.
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.
I'll make an issue for the SDK. When that's done, I'll add it here as well
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.
Please comment here linking the issue once opened. Then, we can resolve this comment. We can add this functionality separately later once the feature is implemented in the SDK.
|
|
||
| function exampleFunc() { | ||
| async function exampleFunc() { | ||
| const encodedMessage = getEncodedMessage("0xc28736dc83f4fd43d6fb832Fd93c3eE7bB26828f", "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"); |
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.
question: what does getEncodedMessage() do? I know this is out of the context of this pull request, but I feel this could use a better name to make it clear what it does.
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.
It's actually a method defined lower in the same code block. Maybe we can rename to getBalanceOfCall or something
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.
I assumed so. Yes, please rename it to make it a bit clearer what it does, you could even use getEncodedBalanceOfCall.
No description provided.