Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ runs:
shell: bash
- run: git submodule update --init --recursive --depth 1
shell: bash
- name: Install Protoc
uses: arduino/setup-protoc@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.80.1
toolchain: 1.82.0
- uses: actions/cache@v3
with:
path: |
Expand Down
1 change: 1 addition & 0 deletions solana-programs/programs/cron/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ solana-zk-sdk = { workspace = true }
tuktuk-program = { git = "https://github.com/helium/tuktuk.git", rev = "112afe5e80aff8199c3b779203b76b35d97c42d1" }
clockwork-cron = "2.0.19"
chrono = "0.4.39"

2 changes: 1 addition & 1 deletion solana-programs/programs/tuktuk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tuktuk"
version = "0.2.2"
version = "0.2.3"
description = "Created with Anchor"
edition = "2021"

Expand Down
22 changes: 14 additions & 8 deletions solana-programs/programs/tuktuk/src/instructions/run_task_v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ impl TasksAccountHeaderV0 {
}
}

const MEMO_PROGRAM_ID: Pubkey = pubkey!("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr");

// Add new iterator struct for reading tasks
pub struct TasksIterator<'a> {
data: &'a mut &'a [u8],
Expand Down Expand Up @@ -205,13 +207,17 @@ impl<'a, 'info> TaskProcessor<'a, 'info> {
}

// Pass free tasks as remaining accounts so the task can know which IDs will be used
let free_tasks = &self.ctx.remaining_accounts[self.free_task_index..];
accounts.extend(free_tasks.iter().cloned());
account_infos.extend(free_tasks.iter().map(|acct| AccountMeta {
pubkey: acct.key(),
is_signer: false,
is_writable: false,
}));
let program_id = remaining_accounts[ix.program_id_index as usize].key;
// Ignore memo program because it expects every account passed to be a signer.
if *program_id != MEMO_PROGRAM_ID {
let free_tasks = &self.ctx.remaining_accounts[self.free_task_index..];
accounts.extend(free_tasks.iter().cloned());
account_infos.extend(free_tasks.iter().map(|acct| AccountMeta {
pubkey: acct.key(),
is_signer: false,
is_writable: false,
}));
}

let signer_seeds: Vec<Vec<&[u8]>> = self
.signers
Expand All @@ -221,7 +227,7 @@ impl<'a, 'info> TaskProcessor<'a, 'info> {

solana_program::program::invoke_signed(
&Instruction {
program_id: *remaining_accounts[ix.program_id_index as usize].key,
program_id: *program_id,
accounts: account_infos,
data: ix.data.clone(),
},
Expand Down
Loading