Skip to content

Commit c3bfdf2

Browse files
authored
Remove instruction buffer feature (#373)
* Remove instruction buffer feature * Remove instruction buffer feature * fmt * Clean up unused ix handlers * Clean up types * Remove instruction buffer wrapper * Clean up sdk.ts * More clean up * Put back approve transaction * approve and unapprove * fmt * Remove unused import
1 parent 164d238 commit c3bfdf2

File tree

14 files changed

+18
-864
lines changed

14 files changed

+18
-864
lines changed

flake.lock

Lines changed: 17 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

programs/smart-wallet/src/instructions/buffer_append_ix.rs

Lines changed: 0 additions & 57 deletions
This file was deleted.

programs/smart-wallet/src/instructions/buffer_close.rs

Lines changed: 0 additions & 45 deletions
This file was deleted.

programs/smart-wallet/src/instructions/buffer_execute_bundle.rs

Lines changed: 0 additions & 58 deletions
This file was deleted.

programs/smart-wallet/src/instructions/buffer_finalize.rs

Lines changed: 0 additions & 42 deletions
This file was deleted.

programs/smart-wallet/src/instructions/buffer_init.rs

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
pub mod approve;
2-
pub mod buffer_append_ix;
3-
pub mod buffer_close;
4-
pub mod buffer_execute_bundle;
5-
pub mod buffer_finalize;
6-
pub mod buffer_init;
72
pub mod unapprove;
83

94
pub use approve::*;
10-
pub use buffer_append_ix::*;
11-
pub use buffer_close::*;
12-
pub use buffer_execute_bundle::*;
13-
pub use buffer_finalize::*;
14-
pub use buffer_init::*;
5+
pub use unapprove::*;

programs/smart-wallet/src/lib.rs

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -365,53 +365,6 @@ pub mod smart_wallet {
365365

366366
Ok(())
367367
}
368-
369-
/// Initializes a new [InstructionBuffer].
370-
#[access_control(ctx.accounts.validate())]
371-
pub fn init_ix_buffer(ctx: Context<InitBuffer>, eta: i64) -> Result<()> {
372-
instructions::buffer_init::handle_init(ctx, eta)
373-
}
374-
375-
/// Initializes a new [InstructionBuffer] containing multiple bundles.
376-
#[access_control(ctx.accounts.validate())]
377-
pub fn init_ix_buffer_with_bundles(
378-
ctx: Context<InitBuffer>,
379-
eta: i64,
380-
num_bundles: u8,
381-
) -> Result<()> {
382-
instructions::buffer_init::handle_init_with_bundles(ctx, eta, num_bundles)
383-
}
384-
385-
/// Closes an [InstructionBuffer].
386-
#[access_control(ctx.accounts.validate())]
387-
pub fn close_ix_buffer(ctx: Context<CloseBuffer>) -> Result<()> {
388-
instructions::buffer_close::handler(ctx)
389-
}
390-
391-
/// Executes a bundle of [InstructionBuffer]s.
392-
#[access_control(ctx.accounts.validate())]
393-
pub fn execute_buffer_bundle<'info>(
394-
ctx: Context<'_, '_, '_, 'info, ExecuteBufferBundle<'info>>,
395-
bundle_index: u8,
396-
) -> Result<()> {
397-
instructions::buffer_execute_bundle::handler(ctx, bundle_index)
398-
}
399-
400-
/// Appends an instruction to an [InstructionBuffer] bundle.
401-
#[access_control(ctx.accounts.validate())]
402-
pub fn append_buffer_ix(
403-
ctx: Context<AppendBufferIX>,
404-
bundle_index: u8,
405-
ix: TXInstruction,
406-
) -> Result<()> {
407-
instructions::buffer_append_ix::handler(ctx, bundle_index, ix)
408-
}
409-
410-
/// Finalizes an [InstructionBuffer] bundle, preventing it from being further mutated.
411-
#[access_control(ctx.accounts.validate())]
412-
pub fn finalize_buffer(ctx: Context<FinalizeBuffer>) -> Result<()> {
413-
instructions::buffer_finalize::handler(ctx)
414-
}
415368
}
416369

417370
/// Accounts for [smart_wallet::create_smart_wallet].

0 commit comments

Comments
 (0)