-
Notifications
You must be signed in to change notification settings - Fork 88
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: add nonce to txHash calculation #66
Conversation
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.
Reviewed 1 of 3 files at r1, 1 of 6 files at r2.
Reviewable status: 2 of 8 files reviewed, 2 unresolved discussions (waiting on @dan-ziv and @liorgold2)
src/constants.js, line 5 at r2 (raw file):
export const LOCAL_STORAGE_TRANSFERS_KEY = 'STARKGATE_TRANSFERS'; export const L2_INVOKE_TX_PREFIX = '115923154332517';
do you need it to compute the hash of regular transactions?
Code quote:
export const L2_INVOKE_TX_PREFIX = '115923154332517'
src/hooks/useEventListener.js, line 37 at r2 (raw file):
logger.log('Event received', {event}); const {to_address, from_address, selector, payload, nonce} = event.returnValues; return txHash(from_address, to_address, selector, payload, chainId, nonce);
Thats a bad name if it works only for l1_handler.
Either pass a tx_hash_prefix param
or rename to L1HandlerTxHash
Code quote:
txHash
src/hooks/useEventListener.js, line 37 at r2 (raw file): Previously, ilyalesokhin-starkware wrote…
That's should be generic. |
src/constants.js, line 5 at r2 (raw file): Previously, ilyalesokhin-starkware wrote…
I'm not sure I need it, currently, I'm calc the txHash only from messages that sent to L2. |
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.
Reviewed 1 of 3 files at r1, 4 of 6 files at r2, all commit messages.
Reviewable status: 7 of 8 files reviewed, 2 unresolved discussions (waiting on @dan-ziv, @ilyalesokhin-starkware, and @liorgold2)
src/hooks/useEventListener.js, line 37 at r2 (raw file):
Previously, dan-ziv (Dan Ziv) wrote…
That's should be generic.
I will soon generlize it to pass txHashPrefix but it will be in a separate change.
I don't like it the replay to my other comment seems to indicate that you are going to support only l1_handlers but you still call this function txHash
src/hooks/useEventListener.js, line 37 at r2 (raw file): Previously, ilyalesokhin-starkware wrote…
done |
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.
Reviewed 1 of 6 files at r2, 6 of 6 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dan-ziv and @liorgold2)
src/hooks/useEventListener.js, line 37 at r2 (raw file):
Previously, dan-ziv (Dan Ziv) wrote…
done
thanks.
Description of the Changes
Please add a detailed description of the change, whether it's an enhancement or a bugfix.
If the PR is related to an open issue please link to it.
Checklist
<type>(optional subject): <description>
, e.g:fix: minor typos in code
This change is