Skip to content

Commit ce9fed3

Browse files
make it compile for --feature cpi (#1748)
Co-authored-by: jordy25519 <[email protected]>
1 parent dd67b7a commit ce9fed3

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

programs/drift/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ openbook-v2-light = { path = "../openbook_v2", features = ["no-entrypoint"] }
4646
ahash = "=0.8.6"
4747
switchboard-on-demand = { path = "../switchboard-on-demand", features = ["no-entrypoint"] }
4848
byteorder = "1.4.3"
49-
memoffset = "0.6"
5049

5150
[dev-dependencies]
5251
bytes = "1.2.0"

programs/drift/src/instructions/admin.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5712,4 +5712,9 @@ pub struct UpdateAmmParams<'info> {
57125712
}
57135713

57145714
#[derive(Accounts)]
5715-
pub struct Empty {}
5715+
pub struct Empty<'info> {
5716+
// this is not used
5717+
// it serves as a placeholder to satisfy 'info lifetime and Accounts macro
5718+
#[account()]
5719+
pub system: Program<'info, System>,
5720+
}

sdk/src/adminClient.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4597,7 +4597,9 @@ export class AdminClient extends DriftClient {
45974597
oraclePrice: BN
45984598
): Promise<TransactionInstruction> {
45994599
return await this.program.instruction.updateMmOracle(oraclePrice, {
4600-
accounts: {},
4600+
accounts: {
4601+
"system": anchor.web3.SystemProgram.programId,
4602+
},
46014603
remainingAccounts: [
46024604
{
46034605
pubkey: this.getPerpMarketAccount(marketIndex).pubkey,

sdk/src/idl/drift.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7526,7 +7526,13 @@
75267526
},
75277527
{
75287528
"name": "updateMmOracle",
7529-
"accounts": [],
7529+
"accounts": [
7530+
{
7531+
"name": "system",
7532+
"isMut": false,
7533+
"isSigner": false
7534+
}
7535+
],
75307536
"args": [
75317537
{
75327538
"name": "oraclePrice",

0 commit comments

Comments
 (0)