@@ -24,11 +24,17 @@ export class TransactionGenerator {
2424 * a transaction with empty inputs/outputs/cellDeps/header/outputs_data/witnesses need 68 Bytes
2525 * every cellDep need 37 Bytes, transaction for deposit needs 2 cellDeps(lock / type)
2626 * every output without typeScript & with lock in secp need 97 Bytes and 4 Bytes for offset (add to transaction)
27- * every output for deposit with typeScript in dao & with lock in secp need 130 Bytes and 4 Bytes for offset (add to transaction)
27+ * every output for deposit with typeScript in dao & with lock in secp need 150 Bytes and 4 Bytes for offset (add to transaction)
2828 * every outputsData in "0x" need 4 Bytes and 4 Bytes for offset
2929 * every outputsData in "0x0000000000000000" need 12 Bytes and 4 Bytes for offset
3030 */
31- return 4 + 68 + 37 * 2 + ( 4 + 97 + 4 + 4 ) + ( 130 + 4 + 12 + 4 )
31+ return 4 + 68 + 37 * 2 + ( 4 + 97 + 4 + 4 ) + ( 150 + 4 + 12 + 4 )
32+ }
33+
34+ public static txSerializedSizeInBlockWithoputInputsForWitdrawStep1 = ( ) : number => {
35+ // a fixed input for (4+44+89) Bytes
36+ // a fixed headerDep for 32 Bytes
37+ return TransactionGenerator . txSerializedSizeInBlockWithoutInputsForDeposit ( ) + ( 4 + 44 + 89 ) + 32
3238 }
3339
3440 public static txSerializedSizeInBlockForWithdraw = ( ) : number => {
@@ -42,7 +48,7 @@ export class TransactionGenerator {
4248 * only one input, for 44 Bytes
4349 * one witness with extra inputType "0x0000000000000000", 101 Bytes, extra 4 Bytes for add to transaction
4450 */
45- return 4 + 68 + 37 * 2 + 32 * 2 + ( 4 + 97 + 4 + 4 ) + ( 101 + 4 )
51+ return 4 + 68 + 37 * 2 + 32 * 2 + ( 4 + 97 + 4 + 4 ) + 44 + ( 101 + 4 )
4652 }
4753
4854 public static txFee = ( size : number , feeRate : bigint ) => {
0 commit comments