| 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) { |