Skip to content
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

Fix ledger support #18

Merged
merged 2 commits into from
Nov 1, 2024
Merged

Fix ledger support #18

merged 2 commits into from
Nov 1, 2024

Conversation

connorwstein
Copy link
Collaborator

No description provided.

@connorwstein connorwstein changed the title Signer Fix ledger support Nov 1, 2024
@connorwstein connorwstein marked this pull request as ready for review November 1, 2024 18:55
func (e *Executor) SigningHash() (common.Hash, error) {
// Convert validUntil to [32]byte
var validUntilBytes [32]byte
binary.BigEndian.PutUint32(validUntilBytes[28:], e.Proposal.ValidUntil) // Place the uint32 in the last 4 bytes
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ABIEncode is more clear since onchain we abi.decode

if err != nil {
return [32]byte{}, err
}
hash := crypto.Keccak256Hash(msg)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fix is here for ledger - this extra hash of the abi.encode(root, validutil) was missing

@connorwstein connorwstein merged commit 47aa372 into develop Nov 1, 2024
1 check passed
@connorwstein connorwstein deleted the fix-signer branch November 1, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant