TransactionHashDeployAccountV3
Calculates the transaction hash for a Deploy Account V3 transaction with resource bounds using the Poseidon hash algorithm.
Function Signature
func TransactionHashDeployAccountV3(
txn *rpc.DeployAccountTxnV3,
contractAddress *felt.Felt,
chainID *felt.Felt,
) (*felt.Felt, error)Parameters
txn- The Deploy Account V3 transaction containing:Version- Transaction version stringClassHash- Hash of the account contract classContractAddressSalt- Salt used in address calculationConstructorCalldata- Constructor parametersNonce- Account nonce (usually 0 for deployment)ResourceBounds- Resource bounds for L1 gas, L2 gas, and L1 data gasTip- Additional fee tipPayMasterData- Optional paymaster dataFeeMode- Fee data availability modeNonceDataMode- Nonce data availability mode
contractAddress- The precomputed contract addresschainID- The Starknet chain ID
Returns
*felt.Felt- The calculated transaction hasherror- Error if required parameters are missing
Description
This function calculates the transaction hash for Deploy Account V3 transactions using the Poseidon hash algorithm. V3 introduces resource bounds, data availability modes, and paymaster support.
Internally uses:
- TipAndResourcesHash - For tip and resource bounds hashing
- DataAvailabilityModeConc - For DA mode concatenation
Specification
Follows the V3 Deploy Account hash calculation specification.
Related Functions
- TransactionHashDeployAccountV1 - Deprecated V1 variant
- PrecomputeAddress - Calculate contract addresses before deployment

