|
8 | 8 |
|
9 | 9 | "github.com/code-payments/code-server/pkg/code/common" |
10 | 10 | "github.com/code-payments/code-server/pkg/solana" |
| 11 | + compute_budget "github.com/code-payments/code-server/pkg/solana/computebudget" |
11 | 12 | "github.com/code-payments/code-server/pkg/solana/cvm" |
12 | 13 | ) |
13 | 14 |
|
@@ -50,6 +51,8 @@ func MakeOpenAccountTransaction( |
50 | 51 | } |
51 | 52 |
|
52 | 53 | instructions := []solana.Instruction{ |
| 54 | + compute_budget.SetComputeUnitPrice(1_000), |
| 55 | + compute_budget.SetComputeUnitLimit(50_000), |
53 | 56 | initializeInstruction, |
54 | 57 | } |
55 | 58 | return MakeNoncedTransaction(nonce, bh, instructions...) |
@@ -84,7 +87,12 @@ func MakeCompressAccountTransaction( |
84 | 87 | }, |
85 | 88 | ) |
86 | 89 |
|
87 | | - return MakeNoncedTransaction(nonce, bh, compressInstruction) |
| 90 | + instructions := []solana.Instruction{ |
| 91 | + compute_budget.SetComputeUnitPrice(1_000), |
| 92 | + compute_budget.SetComputeUnitLimit(200_000), |
| 93 | + compressInstruction, |
| 94 | + } |
| 95 | + return MakeNoncedTransaction(nonce, bh, instructions...) |
88 | 96 | } |
89 | 97 |
|
90 | 98 | func MakeInternalWithdrawTransaction( |
@@ -126,7 +134,12 @@ func MakeInternalWithdrawTransaction( |
126 | 134 | }, |
127 | 135 | ) |
128 | 136 |
|
129 | | - return MakeNoncedTransaction(nonce, bh, execInstruction) |
| 137 | + instructions := []solana.Instruction{ |
| 138 | + compute_budget.SetComputeUnitPrice(1_000), |
| 139 | + compute_budget.SetComputeUnitLimit(200_000), |
| 140 | + execInstruction, |
| 141 | + } |
| 142 | + return MakeNoncedTransaction(nonce, bh, instructions...) |
130 | 143 | } |
131 | 144 |
|
132 | 145 | func MakeExternalWithdrawTransaction( |
@@ -175,7 +188,12 @@ func MakeExternalWithdrawTransaction( |
175 | 188 | }, |
176 | 189 | ) |
177 | 190 |
|
178 | | - return MakeNoncedTransaction(nonce, bh, execInstruction) |
| 191 | + instructions := []solana.Instruction{ |
| 192 | + compute_budget.SetComputeUnitPrice(1_000), |
| 193 | + compute_budget.SetComputeUnitLimit(200_000), |
| 194 | + execInstruction, |
| 195 | + } |
| 196 | + return MakeNoncedTransaction(nonce, bh, instructions...) |
179 | 197 | } |
180 | 198 |
|
181 | 199 | func MakeInternalTransferWithAuthorityTransaction( |
@@ -220,7 +238,12 @@ func MakeInternalTransferWithAuthorityTransaction( |
220 | 238 | }, |
221 | 239 | ) |
222 | 240 |
|
223 | | - return MakeNoncedTransaction(nonce, bh, execInstruction) |
| 241 | + instructions := []solana.Instruction{ |
| 242 | + compute_budget.SetComputeUnitPrice(1_000), |
| 243 | + compute_budget.SetComputeUnitLimit(200_000), |
| 244 | + execInstruction, |
| 245 | + } |
| 246 | + return MakeNoncedTransaction(nonce, bh, instructions...) |
224 | 247 | } |
225 | 248 |
|
226 | 249 | func MakeExternalTransferWithAuthorityTransaction( |
@@ -271,7 +294,12 @@ func MakeExternalTransferWithAuthorityTransaction( |
271 | 294 | }, |
272 | 295 | ) |
273 | 296 |
|
274 | | - return MakeNoncedTransaction(nonce, bh, execInstruction) |
| 297 | + instructions := []solana.Instruction{ |
| 298 | + compute_budget.SetComputeUnitPrice(1_000), |
| 299 | + compute_budget.SetComputeUnitLimit(200_000), |
| 300 | + execInstruction, |
| 301 | + } |
| 302 | + return MakeNoncedTransaction(nonce, bh, instructions...) |
275 | 303 | } |
276 | 304 |
|
277 | 305 | type MergedMemoryBankResult struct { |
|
0 commit comments