-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zeta ABI #2
Zeta ABI #2
Conversation
…'s own cpi module
…t_maintenance_margin(), get_unrealized_pnl()
src/lib.rs
Outdated
@@ -108,4 +113,12 @@ mod zeta { | |||
pub(crate) fn liquidate(ctx: Context<Liquidate>, size: u64) -> Result<()> { | |||
Ok(()) | |||
} | |||
|
|||
pub fn close_open_orders(ctx: Context<CloseOpenOrders>, _map_nonce: u8) -> Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this also be (crate)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
src/account.rs
Outdated
pub perp_parameters: PerpParameters, // 24 | ||
pub perp_sync_queue: Pubkey, // 32 | ||
pub oracle_backup_feed: Pubkey, // 32 | ||
pub padding: [u8; 966], // 966 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be updated to the latest - it's slightly out of date, theres a few fields like
perpOnly, flexUnderlying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cheers
pub enum Asset { | ||
SOL = 0, | ||
BTC = 1, | ||
ETH = 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theres one more APT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cheers
src/account.rs
Outdated
Ok(()) | ||
} | ||
|
||
pub fn reset(&mut self) -> Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set, reset, don't need to be in here, along with the errors
src/account.rs
Outdated
&zeta_group.margin_parameters, | ||
); | ||
|
||
msg!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can probably remove this log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good just the comments i've left which should be easy to fix
could you add to changelog
No description provided.