Conversation
49bd101 to
2b91662
Compare
| // Construct QuarkOperation | ||
| IQuarkWallet.QuarkOperation memory quarkOperation = IQuarkWallet.QuarkOperation({ | ||
| nonce: accountState.quarkNextNonce, | ||
| nonce: bytes32(uint256(accountState.quarkNextNonce)), |
There was a problem hiding this comment.
There's a bunch of interface changes that need to be made in QuarkBuilder for the client to pass in a random nonce. I plan to do that as a separate PR.
|
|
||
| return IQuarkWallet.QuarkOperation({ | ||
| nonce: operation.nonce, | ||
| isReplayable: operation.isReplayable, |
There was a problem hiding this comment.
This is interesting, and I think correct. The Paycall operation is repalyable IFF what it wraps is replayable?
There was a problem hiding this comment.
Exactly. If it's a RecurringSwap using Paycall, then the Paycall itself has to be replayable.
| IQuarkWallet.QuarkOperation memory lastQuarkOperation = quarkOperations[quarkOperations.length - 1]; | ||
| IQuarkWallet.QuarkOperation memory mergedQuarkOperation = IQuarkWallet.QuarkOperation({ | ||
| nonce: lastQuarkOperation.nonce, | ||
| isReplayable: lastQuarkOperation.isReplayable, |
There was a problem hiding this comment.
Same here, so basically if it's wrap and replayableSupply this is now replayableWrapAndSupply?
There was a problem hiding this comment.
Yeah, if the last operation is replayable, the merged operation should be replayable.
Adds `nonceSecret` and `replayCount` to QuarkBuilder. For replayable operations, the QuarkBuilder will also generate the nonce using the `nonceSecret` and `replayCount` (see `generateNonceFromSecret` function). We also uncover and fix a bug where `0` is being used as the `nonce` for an operation when a nonce is not provided for an account by the client. Now, the code reverts if a `nonceSecret` is not given for an account. We buff up the unit tests to assert the right values are being used for the nonces, since nonces were being checked previously.
This patch adds an EIP-712 change for Quark V2, which adds an `isReplayable` field in the typehash of the EIP-712 struct.
ed4b7ee to
fc9d209
Compare
|
EDIT: Replaced that commit with e5e823c, which now just comments out the |
…out MorphoClaimRewards for now
fc9d209 to
e5e823c
Compare
Updating the
quark-scriptsrepo to depend on the latest version of Quark (Quark v2). The main changes in this PR are:quarksubmodule to the latest commit on the Quark v2 branchcancunQuarkOperationstruct to the newest version that has aisReplayablefieldRecurringSwap.solto no longer need acancelfunction and no longer need to callallowReplay()Cancel.solcore script, used for cancelling replayable operationsQuarkBuilderto use Quark v2; add the new fieldsnonceSecretandtotalPlaysto QuarkBuilderQuarkBuilderto get rid of stack too deep errors from introducing the new fields