Skip to content

Commit 43a4c49

Browse files
committed
using signProveAndSendTransaction in place of proveAndSendTransaction
1 parent a967a16 commit 43a4c49

File tree

8 files changed

+45
-12
lines changed

8 files changed

+45
-12
lines changed

packages/sequencer/src/protocol/baselayer/network-utils/LightnetUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ export class LightnetUtils implements MinaNetworkUtils {
105105

106106
tx.sign([faucetDonor]);
107107

108-
await this.transactionSender.proveAndSendTransaction(tx, "included");
108+
await this.transactionSender.signProveAndSendTransaction(
109+
tx,
110+
[faucetDonorPublicKey],
111+
"included"
112+
);
109113

110114
log.provable.info(
111115
`Funded account ${receiver.toBase58()} with ${fundingAmount / 1e9} MINA`

packages/sequencer/src/protocol/baselayer/network-utils/LocalBlockchainUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ export class LocalBlockchainUtils implements MinaNetworkUtils {
8787

8888
tx.sign([faucetDonor]);
8989

90-
await this.transactionSender.proveAndSendTransaction(tx, "included");
90+
await this.transactionSender.signProveAndSendTransaction(
91+
tx,
92+
[faucetDonorPublicKey],
93+
"included"
94+
);
9195

9296
log.provable.info(
9397
`Funded account ${receiver.toBase58()} with ${fundingAmount / 1e9} MINA`

packages/sequencer/src/settlement/BridgingModule.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,14 @@ export class BridgingModule extends SequencerModule<BridgingModuleConfig> {
268268
signingPublicKeys: [contractKey],
269269
});
270270

271-
await this.transactionSender.proveAndSendTransaction(txSigned, "included");
271+
await this.transactionSender.signProveAndSendTransaction(
272+
txSigned,
273+
[
274+
...this.signer.getContractAddresses(),
275+
...(owner ? [owner.address] : []),
276+
],
277+
"included"
278+
);
272279
}
273280

274281
public async getBridgeAddress(
@@ -520,8 +527,9 @@ export class BridgingModule extends SequencerModule<BridgingModuleConfig> {
520527
signingWithSignatureCheck: options.contractKeys,
521528
});
522529

523-
await this.transactionSender.proveAndSendTransaction(
530+
await this.transactionSender.signProveAndSendTransaction(
524531
signedTx,
532+
options.contractKeys,
525533
"included"
526534
);
527535

@@ -654,8 +662,9 @@ export class BridgingModule extends SequencerModule<BridgingModuleConfig> {
654662
signingWithSignatureCheck: [...options.contractKeys],
655663
});
656664

657-
await this.transactionSender.proveAndSendTransaction(
665+
await this.transactionSender.signProveAndSendTransaction(
658666
signedTx,
667+
options.contractKeys,
659668
"included"
660669
);
661670

packages/sequencer/src/settlement/interactions/bridging/BridgingDeployInteraction.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ export class BridgingDeployInteraction implements DeployInteraction {
118118
signingWithSignatureCheck: [...this.signer.getContractAddresses()],
119119
});
120120

121-
await this.transactionSender.proveAndSendTransaction(tx, "included");
121+
await this.transactionSender.signProveAndSendTransaction(
122+
tx,
123+
[...this.signer.getContractAddresses()],
124+
"included"
125+
);
122126

123127
this.addressRegistry.addContractAddress(
124128
"SettlementContract",

packages/sequencer/src/settlement/interactions/bridging/BridgingSettlementInteraction.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ export class BridgingSettlementInteraction implements SettleInteraction {
113113
});
114114

115115
const { transactionId } =
116-
await this.transactionSender.proveAndSendTransaction(tx, "included");
116+
await this.transactionSender.signProveAndSendTransaction(
117+
tx,
118+
this.signer.getContractAddresses(),
119+
"included"
120+
);
117121

118122
log.info("Settlement transaction sent and included");
119123

packages/sequencer/src/settlement/interactions/vanilla/VanillaDeployInteraction.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ export class VanillaDeployInteraction implements DeployInteraction {
107107
signingWithSignatureCheck: [...this.signer.getContractAddresses()],
108108
});
109109

110-
await this.transactionSender.proveAndSendTransaction(tx, "included");
110+
await this.transactionSender.signProveAndSendTransaction(
111+
tx,
112+
this.signer.getContractAddresses(),
113+
"included"
114+
);
111115

112116
this.addressRegistry.addContractAddress(
113117
"SettlementContract",

packages/sequencer/src/settlement/interactions/vanilla/VanillaSettlementInteraction.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ export class VanillaSettlementInteraction implements SettleInteraction {
105105
});
106106

107107
const { transactionId } =
108-
await this.transactionSender.proveAndSendTransaction(tx, "included");
108+
await this.transactionSender.signProveAndSendTransaction(
109+
tx,
110+
this.signer.getContractAddresses(),
111+
"included"
112+
);
109113

110114
log.info("Settlement transaction sent and included");
111115

packages/sequencer/src/settlement/transactions/L1TransactionDispatcher.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import {
77
PendingL1TransactionStorage,
88
} from "../../storage/repositories/PendingL1TransactionStorage";
99
import { MinaSigner } from "../MinaSigner";
10+
import type { MinaBaseLayer } from "../../protocol/baselayer/MinaBaseLayer";
1011

1112
import { L1TransactionRetryStrategy } from "./L1TransactionRetryStrategy";
1213
import { TxStatusWaiter } from "./TxStatusWaiter";
1314
import { checkZkappTransactionStatus } from "./ZkappTransactionStatus";
14-
import { MinaBaseLayer } from "../../protocol/baselayer/MinaBaseLayer";
1515

1616
export interface DispatcherConfig {
1717
pollIntervalMs?: number;
@@ -38,7 +38,7 @@ export class L1TransactionDispatcher {
3838
private readonly waiter: TxStatusWaiter,
3939
@inject("L1TransactionDispatcherConfig")
4040
private readonly config: Required<DispatcherConfig>,
41-
@inject("MinaBaseLayer")
41+
@inject("BaseLayer")
4242
private readonly baseLayer: MinaBaseLayer
4343
) {}
4444

@@ -184,7 +184,7 @@ export class L1TransactionDispatcher {
184184
}
185185

186186
// don't check status on local chain
187-
if (!this.baseLayer.isLocalBlockChain()) {
187+
if (this.baseLayer.isLocalBlockChain()) {
188188
await this.pendingStorage.update(record.id, {
189189
status: "included",
190190
});

0 commit comments

Comments
 (0)