-
Notifications
You must be signed in to change notification settings - Fork 34
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
sapphire: initial notes on authenticated calls & contract authentication #476
Conversation
✅ Deploy Preview for trusting-archimedes-14c863 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
First pass.
Also, can you wrap the lines to 80 characters, so it's easier to read the source code and review it on github.
And also we should mention this chapter in https://deploy-preview-476--trusting-archimedes-14c863.netlify.app/dapp/sapphire/guide#transactions--calls section where we already talk about signed/unsigned calls and MetaMask popups.
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.
Another pass.
another contract in a way which could reveal sensitive information, the calling | ||
contract must implement access control or authentication. | ||
|
||
By default all `eth_call` queries used to invoke contract functions have the |
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.
By default? I don't think you can easily change this behavior in Sapphire so I would remove "By default".
These parameters are visible in the EIP-712 popup signed by the user. Queries | ||
with the same parameters will use the same leash. |
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.
These parameters are visible in the EIP-712 popup signed by the user. Queries | |
with the same parameters will use the same leash. | |
These parameters are visible in the [EIP-712][eip-712] popup signed by the user. **Queries | |
with the same parameters will use the same leash.** |
Perhaps this would be a good place to have a screenshot of Metamask showing some EIP-712 content?
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
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 think the sections on types of contract calls, and Sapphire's treatment of signed queries are straightforward and informative and good to go.
With regards to the authenticated calls and SignInExample
, I'd say we give it a try.
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.
Some minor nits. Otherwise LGTM!
|
||
Behind the scenes the signed queries use a "leash" to specify validity conditions | ||
so the query can only be performed within a block and account `nonce` range. | ||
These parameters are visible in the EIP-712 popup signed by the user. Queries |
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.
If the query is cached, then no user interaction is required? Where does EIP-712 popup then come from?
|
||
Behind the scenes the signed queries use a "leash" to specify validity conditions | ||
so the query can only be performed within a block and account `nonce` range. | ||
These parameters are visible in the EIP-712 popup signed by the user. Queries |
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.
These parameters are visible in the EIP-712 popup signed by the user. Queries | |
These parameters are visible in the [EIP-712][eip-712] popup signed by the user. Queries |
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Xi Zhang <[email protected]>
Co-authored-by: Xi Zhang <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
Co-authored-by: Matevž Jekovec <[email protected]>
This covers patterns for verifying caller identity for view calls.
Preview: https://deploy-preview-476--trusting-archimedes-14c863.netlify.app/dapp/sapphire/authentication