MCPcopy Create free account
hub / github.com/MystenLabs/capybot / executeTransactionBlock

Method executeTransactionBlock

src/capybot.ts:115–135  ·  view source on GitHub ↗
(
    transactionBlock: TransactionBlock,
    strategy: Strategy
  )

Source from the content-addressed store, hash-verified

113 }
114
115 private async executeTransactionBlock(
116 transactionBlock: TransactionBlock,
117 strategy: Strategy
118 ) {
119 if (transactionBlock.blockData.transactions.length !== 0) {
120 try {
121 transactionBlock.setGasBudget(1500000000);
122 let result = await this.signer.signAndExecuteTransactionBlock({
123 transactionBlock,
124 requestType: "WaitForLocalExecution",
125 options: {
126 showObjectChanges: true,
127 showEffects: true,
128 },
129 });
130 logger.info({ strategy: strategy, transaction: result }, "transaction");
131 } catch (e) {
132 logger.error(e);
133 }
134 }
135 }
136
137 /** Add a strategy to this bot. The pools it subscribes to must have been added first. */
138 addStrategy(strategy: Strategy) {

Callers 1

loopMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected