Account signing utilities - #114
Merged
Merged
Conversation
This reverts commit e879bb1.
Destiner
commented
Aug 5, 2025
Comment on lines
+49
to
+57
| // Manually tweak the `v` value to trigger the message prefixing onchain | ||
| // https://github.com/rhinestonewtf/checknsignatures/blob/main/src/CheckNSignatures.sol#L53-L61 | ||
| const { r, s, v } = parseSignature(originalSignature) | ||
| if (!v) { | ||
| throw new Error('Invalid signature') | ||
| } | ||
| const newV = v + 4n | ||
| const newSignature = concat([r, s, toHex(newV)]) | ||
| return newSignature |
Contributor
Author
There was a problem hiding this comment.
v flickering to toggle between message and typed data signing
Destiner
commented
Aug 5, 2025
| rhinestoneApiKey: MOCK_API_KEY, | ||
| }) | ||
| expect(address).toEqual('0xa32fa78416f6c68ce4f75f702e07849a269feffb') | ||
| expect(address).toEqual('0x7fbe9b0796484c06c94968b910a4cf488fd1719b') |
Contributor
Author
There was a problem hiding this comment.
All the unit test updates are due to the contract address changes.
Destiner
commented
Aug 5, 2025
Comment on lines
39
to
+44
| const NEXUS_IMPLEMENTATION_ADDRESS: Address = | ||
| '0x0000000000Fb742636364B5ca9B6D2ebbC63FB5D' | ||
| '0x55cc6609fDb3620ABeABf4dB020abfc469494778' | ||
| const NEXUS_FACTORY_ADDRESS: Address = | ||
| '0x0000000000751F0a4816c34fB95ccbD463878361' | ||
| '0xFF4454d15707a6f6BF01540796040f9E1646322C' | ||
| const NEXUS_BOOTSTRAP_ADDRESS: Address = | ||
| '0x00000000001Cf4667Bfd7be8f67D01d63938784b' | ||
| '0x40E89A87C56A340c9257350dEDf4B89a3FcCCcD3' |
Contributor
Author
There was a problem hiding this comment.
@kopy-kat ideally we update to prod addresses before merging, but we can test with those I think
Member
There was a problem hiding this comment.
yeah if we're confident in the tests then I can redeploy
Destiner
commented
Aug 5, 2025
|
|
||
| interface IntentData { | ||
| type: 'intent' | ||
| hash: Hex |
Contributor
Author
There was a problem hiding this comment.
Could put back but probably not needed for consumers
Destiner
commented
Aug 5, 2025
Comment on lines
477
to
+481
| initData: encodePacked( | ||
| ['uint128', 'uint128'], | ||
| ['uint48', 'uint48'], | ||
| [ | ||
| BigInt(policy.validUntil) / 1000n, | ||
| BigInt(policy.validAfter) / 1000n, | ||
| Math.floor(policy.validUntil / 1000), | ||
| Math.floor(policy.validAfter / 1000), |
kopy-kat
requested changes
Aug 5, 2025
kopy-kat
left a comment
Member
There was a problem hiding this comment.
lets also remove the claimhash proofer in this pr
Comment on lines
39
to
+44
| const NEXUS_IMPLEMENTATION_ADDRESS: Address = | ||
| '0x0000000000Fb742636364B5ca9B6D2ebbC63FB5D' | ||
| '0x55cc6609fDb3620ABeABf4dB020abfc469494778' | ||
| const NEXUS_FACTORY_ADDRESS: Address = | ||
| '0x0000000000751F0a4816c34fB95ccbD463878361' | ||
| '0xFF4454d15707a6f6BF01540796040f9E1646322C' | ||
| const NEXUS_BOOTSTRAP_ADDRESS: Address = | ||
| '0x00000000001Cf4667Bfd7be8f67D01d63938784b' | ||
| '0x40E89A87C56A340c9257350dEDf4B89a3FcCCcD3' |
Member
There was a problem hiding this comment.
yeah if we're confident in the tests then I can redeploy
| { name: 'tokenOut', type: 'Token[]' }, | ||
| { name: 'targetChain', type: 'uint256' }, | ||
| { name: 'fillExpiry', type: 'uint256' }, | ||
| { name: 'claimProofer', type: 'address' }, |
|
|
||
| interface IntentData { | ||
| type: 'intent' | ||
| hash: Hex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds signing utilities to the
accountinstance:signMessagefor EIP191 message signingsignTypedDatafor EIP712 typed data signingAlso uses typed data signing to sign the intent ops.
Checklist