Skip to content

Commit

Permalink
fix: narrow TransactionRequest type to indicate it's serializable (#33
Browse files Browse the repository at this point in the history
)

closes #32
  • Loading branch information
cristovaoth authored Jan 30, 2025
1 parent b48ccbe commit 946b81b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Binary file modified bun.lockb
Binary file not shown.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
},
"devDependencies": {
"@gnosis-guild/zodiac-core": "^2.0.4",
"@types/bun": "^1.1.15",
"@types/bun": "^1.2.1",
"@types/wait-on": "^5.3.4",
"prettier": "^3.4.2",
"tsup": "^8.1.0",
"typescript": "^5.7.2",
"tsup": "^8.3.6",
"typescript": "^5.7.3",
"wait-on": "8.0.1"
},
"dependencies": {
Expand All @@ -41,6 +41,6 @@
"@safe-global/protocol-kit": "^5.1.1",
"@safe-global/safe-deployments": "^1.37.22",
"@safe-global/types-kit": "^1.0.1",
"viem": "^2.22.4"
"viem": "^2.22.17"
}
}
4 changes: 2 additions & 2 deletions src/encode/execTransaction.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Address, encodeFunctionData, Hex, parseAbi } from 'viem'
import { SafeTransactionRequest, TransactionRequest } from '../types'
import { encodeFunctionData, Hex, parseAbi } from 'viem'
import { SafeTransactionRequest } from '../types'

const abi = parseAbi([
'function execTransaction(address to, uint256 value, bytes data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, bytes signatures) payable returns (bool success)',
Expand Down
8 changes: 6 additions & 2 deletions src/execute/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import type { Address, TransactionRequest, TypedDataDomain } from 'viem'
import type { Address, TypedDataDomain } from 'viem'
import type { SafeTransactionOptionalProps } from '@safe-global/protocol-kit'

import type { ChainId, PrefixedAddress, SafeTransactionRequest } from '../types'
import type {
ChainId,
SafeTransactionRequest,
TransactionRequest,
} from '../types'

export enum ExecutionActionType {
EXECUTE_TRANSACTION = 'EXECUTE_TRANSACTION',
Expand Down

0 comments on commit 946b81b

Please sign in to comment.