Skip to content
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

feat: Starknet messaging function and event reference (based on #1094) #1209

Closed
wants to merge 26 commits into from

Conversation

stoobie
Copy link
Collaborator

@stoobie stoobie commented Apr 1, 2024

Description of the Changes

Add Messaging function and event reference.

Based on #1094.

Closes #1086.

PR Preview URL

Messaging reference

Check List

  • Changes have been done against main branch, and PR does not conflict
  • PR title follows the convention: <docs/feat/fix/chore>(optional scope): <description>, e.g: fix: minor typos in code

This change is Reviewable

@stoobie stoobie requested a review from 0xLucqs April 1, 2024 13:12
Copy link

github-actions bot commented Apr 1, 2024

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

@xiaolou86 xiaolou86 mentioned this pull request Apr 2, 2024
2 tasks
@stoobie stoobie changed the title Starknet message feat: Starknet messaging function and event reference (based on #1094) Apr 2, 2024
Copy link
Collaborator

@0xLucqs 0xLucqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest looks good. I'd still have remo review it though

= Messaging function and event reference
:description: Comprehensive function and event reference for the `StarknetMessaging` smart contracts.

The `StarknetMessaging` smart contracts include functions and events that you use to implement various messaging flows in a dApp.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reformulate

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LucasLvy Can you suggest what you think should be here?

Comment on lines 19 to 28
* xref:#cancelL1ToL2Message[`cancelL1ToL2Message`]
* xref:#consumeMessageFromL2[`consumeMessageFromL2`]
* xref:#getMaxL1MsgFee[`getMaxL1MsgFee`]
* xref:#l1ToL2Messages[`l1ToL2Messages`]
* xref:#sendMessageToL2[`sendMessageToL2`]
* xref:#startL1ToL2MessageCancellation[`startL1ToL2MessageCancellation`]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are only the functions defined in IStarknetMessaging.sol it misses the functions implemented in StarknetMessaging.sol which are not part of the interface.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LucasLvy
Added:

  • l1ToL2MessageCancellations
  • l1ToL2MessageNonce
  • l2ToL1Messages
  • messageCancellationDelay

We don't document getL1ToL2MsgHash. It is marked as internal. Do you think it needs to be documented?

@stoobie
Copy link
Collaborator Author

stoobie commented Apr 4, 2024

@xiaolou86 Please make sure you also implement Lucas' comment in #1094.

@xiaolou86
Copy link
Contributor

@xiaolou86 Please make sure you also implement Lucas' comment in #1094.

ok, I will update it.

@stoobie
Copy link
Collaborator Author

stoobie commented Apr 17, 2024

Hi @xiaolou86 Any update on this?

@xiaolou86
Copy link
Contributor

Hi @xiaolou86 Any update on this?

@stoobie I had already updated into #1094 2 weeks ago.

@xiaolou86
Copy link
Contributor

I am sorry that I don't know how to cherry-pick from #1094 to here.

Copy link

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

Copy link

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

7 similar comments
@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

Copy link
Collaborator Author

@stoobie stoobie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LucasLvy Please approve.

Comment on lines 19 to 28
* xref:#cancelL1ToL2Message[`cancelL1ToL2Message`]
* xref:#consumeMessageFromL2[`consumeMessageFromL2`]
* xref:#getMaxL1MsgFee[`getMaxL1MsgFee`]
* xref:#l1ToL2Messages[`l1ToL2Messages`]
* xref:#sendMessageToL2[`sendMessageToL2`]
* xref:#startL1ToL2MessageCancellation[`startL1ToL2MessageCancellation`]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LucasLvy
Added:

  • l1ToL2MessageCancellations
  • l1ToL2MessageNonce
  • l2ToL1Messages
  • messageCancellationDelay

We don't document getL1ToL2MsgHash. It is marked as internal. Do you think it needs to be documented?

Copy link
Collaborator Author

@stoobie stoobie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiaolou86 Please see my comments.

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/documentation/ .

xiaolou86 and others added 22 commits June 9, 2024 17:25
…twork_Architecture/messaging_reference.adoc

Co-authored-by: Steve Goodman <39279277+stoobie@users.noreply.github.com>
…twork_Architecture/messaging_reference.adoc

Co-authored-by: Steve Goodman <39279277+stoobie@users.noreply.github.com>
…twork_Architecture/messaging_reference.adoc

Co-authored-by: Steve Goodman <39279277+stoobie@users.noreply.github.com>
…twork_Architecture/messaging_reference.adoc

Co-authored-by: Steve Goodman <39279277+stoobie@users.noreply.github.com>
…twork_Architecture/messaging_reference.adoc

Co-authored-by: Steve Goodman <39279277+stoobie@users.noreply.github.com>
…twork_Architecture/messaging_reference.adoc

Co-authored-by: Steve Goodman <39279277+stoobie@users.noreply.github.com>
…twork_Architecture/messaging_reference.adoc

Co-authored-by: Steve Goodman <39279277+stoobie@users.noreply.github.com>
…twork_Architecture/messaging_reference.adoc

Co-authored-by: Steve Goodman <39279277+stoobie@users.noreply.github.com>
…twork_Architecture/messaging_reference.adoc

Co-authored-by: Steve Goodman <39279277+stoobie@users.noreply.github.com>
…twork_Architecture/messaging_reference.adoc

Co-authored-by: Steve Goodman <39279277+stoobie@users.noreply.github.com>
Co-authored-by: xiaolou86 <20718693+xiaolou86@users.noreply.github.com>
@stoobie stoobie force-pushed the starknet_message branch from fca89ae to 4671fe2 Compare June 9, 2024 14:29
@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/ .

@xiaolou86
Copy link
Contributor

@xiaolou86 Please do the following:

  1. Rename the file to be messaging-reference.adoc (hyphen replaces underscore in file name)
  2. Copy the changes over from feat: Starknet messaging function and event reference (based on #1094) #1209.
  3. For each event that is emitted, state which function emits it. For each function that emits an event, add a heading "Emitted event" with the name of the event that emitted it, with a link to the event lower down in the page. For example, see ConsumedMessageToL2 and consumeMessageFromL2 in feat: Starknet messaging function and event reference (based on #1094) #1209.

@stoobie All done in PR #1094 . Thank you very much.

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1209/ .

@stoobie
Copy link
Collaborator Author

stoobie commented Jun 23, 2024

#1094 is merged, so closing this one.

@stoobie stoobie closed this Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for Contribution: L1-L2 Messaging programming reference
4 participants