-
Notifications
You must be signed in to change notification settings - Fork 2
feat: example code to sign & send Orders #44
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
Conversation
a32f71c
to
c042ebe
Compare
470003c
to
a0b5e79
Compare
a0b5e79
to
0118576
Compare
@@ -87,6 +87,17 @@ impl SignetSystemConstants { | |||
self.host.is_system_contract(address) | |||
} | |||
|
|||
/// Get the Order contract address for the given chain id. | |||
pub const fn orders_for(&self, chain_id: u64) -> Option<Address> { |
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.
not sure if this is the most idiomatic way to do this?
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.
the fn signature is idiomatic, but it's kinda weird in that there are exactly 2 choices, and the caller will always know which they want, so why do we allow passing an arbitrary chain id? caller should probably use .host_orders()
or .rollup_orders()
directly instead?
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 kinda fine this way I guess? the agg may contain invalid or junk data and this is one of the better ways to handle that I suppose
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.
yeah i wish we didn't have an arbitrary chain id here, but james's argument is sound
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.
basically lgtm, just the convo about the chain id
@@ -87,6 +87,17 @@ impl SignetSystemConstants { | |||
self.host.is_system_contract(address) | |||
} | |||
|
|||
/// Get the Order contract address for the given chain id. | |||
pub const fn orders_for(&self, chain_id: u64) -> Option<Address> { |
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.
yeah i wish we didn't have an arbitrary chain id here, but james's argument is sound
Uh oh!
There was an error while loading. Please reload this page.