@@ -83,6 +83,7 @@ type DepositStakeInstruction = IInstruction<typeof SINGLE_POOL_PROGRAM_ID> &
8383 [
8484 ReadonlyAccount < PoolAddress > ,
8585 WritableAccount < PoolStakeAddress > ,
86+ ReadonlyAccount < PoolOnRampAddress > ,
8687 WritableAccount < PoolMintAddress > ,
8788 ReadonlyAccount < PoolStakeAuthorityAddress > ,
8889 ReadonlyAccount < PoolMintAuthorityAddress > ,
@@ -102,6 +103,7 @@ type WithdrawStakeInstruction = IInstruction<typeof SINGLE_POOL_PROGRAM_ID> &
102103 [
103104 ReadonlyAccount < PoolAddress > ,
104105 WritableAccount < PoolStakeAddress > ,
106+ ReadonlyAccount < PoolOnRampAddress > ,
105107 WritableAccount < PoolMintAddress > ,
106108 ReadonlyAccount < PoolStakeAuthorityAddress > ,
107109 ReadonlyAccount < PoolMintAuthorityAddress > ,
@@ -247,8 +249,9 @@ export async function depositStakeInstruction(
247249 userLamportAccount : Address ,
248250) : Promise < DepositStakeInstruction > {
249251 const programAddress = SINGLE_POOL_PROGRAM_ID ;
250- const [ stake , mint , stakeAuthority , mintAuthority ] = await Promise . all ( [
252+ const [ stake , onramp , mint , stakeAuthority , mintAuthority ] = await Promise . all ( [
251253 findPoolStakeAddress ( programAddress , pool ) ,
254+ findPoolOnRampAddress ( programAddress , pool ) ,
252255 findPoolMintAddress ( programAddress , pool ) ,
253256 findPoolStakeAuthorityAddress ( programAddress , pool ) ,
254257 findPoolMintAuthorityAddress ( programAddress , pool ) ,
@@ -261,6 +264,7 @@ export async function depositStakeInstruction(
261264 accounts : [
262265 { address : pool , role : AccountRole . READONLY } ,
263266 { address : stake , role : AccountRole . WRITABLE } ,
267+ { address : onramp , role : AccountRole . READONLY } ,
264268 { address : mint , role : AccountRole . WRITABLE } ,
265269 { address : stakeAuthority , role : AccountRole . READONLY } ,
266270 { address : mintAuthority , role : AccountRole . READONLY } ,
@@ -284,8 +288,9 @@ export async function withdrawStakeInstruction(
284288 tokenAmount : bigint ,
285289) : Promise < WithdrawStakeInstruction > {
286290 const programAddress = SINGLE_POOL_PROGRAM_ID ;
287- const [ stake , mint , stakeAuthority , mintAuthority ] = await Promise . all ( [
291+ const [ stake , onramp , mint , stakeAuthority , mintAuthority ] = await Promise . all ( [
288292 findPoolStakeAddress ( programAddress , pool ) ,
293+ findPoolOnRampAddress ( programAddress , pool ) ,
289294 findPoolMintAddress ( programAddress , pool ) ,
290295 findPoolStakeAuthorityAddress ( programAddress , pool ) ,
291296 findPoolMintAuthorityAddress ( programAddress , pool ) ,
@@ -303,6 +308,7 @@ export async function withdrawStakeInstruction(
303308 accounts : [
304309 { address : pool , role : AccountRole . READONLY } ,
305310 { address : stake , role : AccountRole . WRITABLE } ,
311+ { address : onramp , role : AccountRole . READONLY } ,
306312 { address : mint , role : AccountRole . WRITABLE } ,
307313 { address : stakeAuthority , role : AccountRole . READONLY } ,
308314 { address : mintAuthority , role : AccountRole . READONLY } ,
0 commit comments