-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add encryptCallData() to gasless chapter and example #477
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for oasisprotocol-sapphire-paratime ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
f5ff7d0
to
d0d56b2
Compare
9b80896
to
7273f83
Compare
7273f83
to
7cfbc50
Compare
solidity: { | ||
version: '0.8.20', | ||
settings: { | ||
// XXX: Needs to match https://github.com/oasisprotocol/sapphire-paratime/blob/main/contracts/hardhat.config.ts |
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.
Based on some of my quick testing I believe it is not about matching, but actually things fail without this optimization enabled.
For example, removing this optimization in contracts/hardhat.config.ts makes the tests in contracts/ fail as well.
Do we know why this happens? Should someone investigate this further?
const tx = await commentBox.comment('Hello, world!'); | ||
await tx.wait(); | ||
// TODO: https://github.com/oasisprotocol/sapphire-paratime/issues/179 | ||
const response = await provider.broadcastTransaction(tx); |
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.
calldata encryption could be checked here (requires sapphire-paratime import)
const response = await provider.broadcastTransaction(tx); | |
const response = await provider.broadcastTransaction(tx); | |
expect(isCalldataEnveloped(response.data)).eq(!plain); |
also is the TODO still open?
I used await wrapEthereumProvider(provider).broadcastTransaction(tx)
and didn't got an error.
This PR:
encryptCallData()
ingasless.md
to generate encrypted gasless transactionencryptCallData()
toexamples/onchain-signer
and tests itPREVIEW
Fixes #463.