Skip to content

Commit

Permalink
[1.0.5] patch multisig verification to use ethers instead of viem
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrower95 committed Jan 10, 2025
1 parent 89ffd58 commit 6b9b446
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@layr-labs/zeus",
"version": "1.0.4",
"version": "1.0.5",
"description": "web3 deployer / metadata manager",
"main": "src/index.ts",
"scripts": {
Expand Down
10 changes: 3 additions & 7 deletions src/signing/strategies/gnosis/api/gnosisLedger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import * as prompts from '../../../../commands/prompts';
import { JsonRpcProvider } from "ethers";
import * as AllChains from 'viem/chains';
import { abi } from "../onchain/Safe";
import { ethers } from 'ethers';

export class GnosisLedgerStrategy extends GnosisApiStrategy {
id = "gnosis.api.ledger";
Expand Down Expand Up @@ -73,13 +74,8 @@ export class GnosisLedgerStrategy extends GnosisApiStrategy {
typedDataArgs.message
) as `0x${string}`

const verification = await verifyTypedData({
...typedDataArgs,
address: addr,
signature
})

if (!verification) {
const fromAddr = ethers.verifyTypedData(typedDataArgs.domain, {SafeTx: typedDataArgs.types.SafeTx} as unknown as Record<string, TypedDataField[]>, typedDataArgs.message, signature);
if (fromAddr !== addr) {
console.error(`Failed to verify signature. Nothing will be submitted. (signed from ${addr})`);
console.warn(`Typed data: `, typedDataArgs);
console.warn(`Signature: ${signature}`);
Expand Down

0 comments on commit 6b9b446

Please sign in to comment.