Skip to content

Commit

Permalink
Add missed struct
Browse files Browse the repository at this point in the history
  • Loading branch information
s6nqou committed Dec 12, 2024
1 parent 9b0ae8e commit 9870177
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 5 deletions.
10 changes: 5 additions & 5 deletions programs/pump/src/instructions.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::states::Global;
use crate::states::{BondingCurve, Global};
use anchor_lang::prelude::*;
use anchor_spl::{
associated_token::AssociatedToken,
Expand Down Expand Up @@ -54,7 +54,7 @@ pub struct Create<'info> {
seeds = [SEED_BONDING_CURVE, &mint.key().to_bytes()],
bump,
)]
pub bonding_curve: SystemAccount<'info>,
pub bonding_curve: Account<'info, BondingCurve>,

#[account(
mut,
Expand Down Expand Up @@ -117,7 +117,7 @@ pub struct Buy<'info> {
seeds = [SEED_BONDING_CURVE, &mint.key().to_bytes()],
bump,
)]
pub bonding_curve: SystemAccount<'info>,
pub bonding_curve: Account<'info, BondingCurve>,

#[account(
mut,
Expand Down Expand Up @@ -161,7 +161,7 @@ pub struct Sell<'info> {
seeds = [SEED_BONDING_CURVE, &mint.key().to_bytes()],
bump,
)]
pub bonding_curve: SystemAccount<'info>,
pub bonding_curve: Account<'info, BondingCurve>,

#[account(
mut,
Expand Down Expand Up @@ -199,7 +199,7 @@ pub struct Withdraw<'info> {
seeds = [SEED_BONDING_CURVE, &mint.key().to_bytes()],
bump,
)]
pub bonding_curve: SystemAccount<'info>,
pub bonding_curve: Account<'info, BondingCurve>,

#[account(
mut,
Expand Down
45 changes: 45 additions & 0 deletions target/idl/pump.json
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,19 @@
}
],
"accounts": [
{
"name": "BondingCurve",
"discriminator": [
23,
183,
248,
55,
96,
216,
172,
96
]
},
{
"name": "Global",
"discriminator": [
Expand Down Expand Up @@ -1174,6 +1187,38 @@
}
],
"types": [
{
"name": "BondingCurve",
"type": {
"kind": "struct",
"fields": [
{
"name": "virtual_token_reserves",
"type": "u64"
},
{
"name": "virtual_sol_reserves",
"type": "u64"
},
{
"name": "real_token_reserves",
"type": "u64"
},
{
"name": "real_sol_reserves",
"type": "u64"
},
{
"name": "token_total_suply",
"type": "u64"
},
{
"name": "complete",
"type": "bool"
}
]
}
},
{
"name": "CompleteEvent",
"type": {
Expand Down
45 changes: 45 additions & 0 deletions target/types/pump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,19 @@ export type Pump = {
}
],
"accounts": [
{
"name": "bondingCurve",
"discriminator": [
23,
183,
248,
55,
96,
216,
172,
96
]
},
{
"name": "global",
"discriminator": [
Expand Down Expand Up @@ -1180,6 +1193,38 @@ export type Pump = {
}
],
"types": [
{
"name": "bondingCurve",
"type": {
"kind": "struct",
"fields": [
{
"name": "virtualTokenReserves",
"type": "u64"
},
{
"name": "virtualSolReserves",
"type": "u64"
},
{
"name": "realTokenReserves",
"type": "u64"
},
{
"name": "realSolReserves",
"type": "u64"
},
{
"name": "tokenTotalSuply",
"type": "u64"
},
{
"name": "complete",
"type": "bool"
}
]
}
},
{
"name": "completeEvent",
"type": {
Expand Down

0 comments on commit 9870177

Please sign in to comment.