(txs: VersionedTransaction[], keypair: Keypair)
| 13 | }) |
| 14 | |
| 15 | export async function bundle(txs: VersionedTransaction[], keypair: Keypair) { |
| 16 | try { |
| 17 | const txNum = Math.ceil(txs.length / 3) |
| 18 | let successNum = 0 |
| 19 | for (let i = 0; i < txNum; i++) { |
| 20 | const upperIndex = (i + 1) * 3 |
| 21 | const downIndex = i * 3 |
| 22 | const newTxs = [] |
| 23 | for (let j = downIndex; j < upperIndex; j++) { |
| 24 | if (txs[j]) newTxs.push(txs[j]) |
| 25 | } |
| 26 | let success = await bull_dozer(newTxs, keypair) |
| 27 | return success |
| 28 | } |
| 29 | if (successNum == txNum) return true |
| 30 | else return false |
| 31 | } catch (error) { |
| 32 | return false |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | export async function bull_dozer(txs: VersionedTransaction[], keypair: Keypair) { |
| 37 | try { |
nothing calls this directly
no test coverage detected