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: 3 additions & 1 deletion .github/workflows/trident-fuzz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
CARGO_TERM_COLOR: always
SOLANA_VERSION: "v3.1.9"
TRIDENT_VERSION: "0.13.0-rc.2"
TRIDENT_VERSION: "0.13.0-rc.3"

jobs:
build:
Expand Down Expand Up @@ -67,6 +67,8 @@ jobs:
target: "fuzz_pbpp"
- name: "fuzz_mint_governor"
target: "fuzz_mint_governor"
- name: "fuzz_ppv2"
target: "fuzz_ppv2"

steps:
- uses: actions/checkout@v4
Expand Down
76 changes: 52 additions & 24 deletions trident-tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion trident-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ borsh = "1.5.3"
squads-multisig = { git = "https://github.com/Squads-Protocol/v4", rev = "05f23726a094b6a5a0d97eaccf22af72373ac9c6" }

[dependencies.trident-fuzz]
version = "0.13.0-rc.2"
version = "0.13.0-rc.3"
features = ["token"]

[lib]
Expand Down
8 changes: 4 additions & 4 deletions trident-tests/common/conditional_vault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn initialize_question(

let res = trident.process_transaction(&[init_question], message);

assert!(res.is_success());
invariant!(res.is_success());

question
}
Expand Down Expand Up @@ -87,7 +87,7 @@ pub fn initialize_conditional_vault(

let res = trident.process_transaction(&[init_cond_vault], message);

assert!(res.is_success());
invariant!(res.is_success());

vault
}
Expand Down Expand Up @@ -144,7 +144,7 @@ pub fn split_tokens(

let res = trident.process_transaction(&[split_ix], message);

assert!(res.is_success());
invariant!(res.is_success());
}

pub fn merge_tokens(
Expand Down Expand Up @@ -198,5 +198,5 @@ pub fn merge_tokens(

let res = trident.process_transaction(&[merge_ix], message);

assert!(res.is_success());
invariant!(res.is_success());
}
20 changes: 10 additions & 10 deletions trident-tests/common/futarchy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use super::types::futarchy::StakeToProposalInstructionAccounts;
use super::types::futarchy::StakeToProposalInstructionData;
use super::types::*;

use trident_fuzz::fuzzing::prelude::TridentTransactionResult;
use trident_fuzz::fuzzing::*;
use trident_fuzz::trident::transaction_result::TransactionResult;

use super::constants::*;
use super::types::futarchy::InitializeDaoParams;
Expand Down Expand Up @@ -65,7 +65,7 @@ pub fn initialize_dao(

let res = trident.process_transaction(&[init_dao], message);

assert!(res.is_success());
invariant!(res.is_success());

(dao, squads_multisig)
}
Expand Down Expand Up @@ -108,7 +108,7 @@ pub fn initialize_proposal(

let res = trident.process_transaction(&[init_prop], message);

assert!(res.is_success());
invariant!(res.is_success());

proposal
}
Expand Down Expand Up @@ -155,7 +155,7 @@ pub fn stake_to_proposal(

let res = trident.process_transaction(&[stake_to_proposal_ix], message);

assert!(res.is_success());
invariant!(res.is_success());
}

#[allow(clippy::too_many_arguments)]
Expand Down Expand Up @@ -222,7 +222,7 @@ pub fn launch_proposal(

let res = trident.process_transaction(&[launch_ix], message);

assert!(res.is_success());
invariant!(res.is_success());
}

pub fn spot_swap(
Expand All @@ -231,7 +231,7 @@ pub fn spot_swap(
user: Pubkey,
params: futarchy::SpotSwapParams,
message: Option<&str>,
) -> TransactionResult {
) -> TridentTransactionResult {
let dao_data = trident
.get_account_with_type::<futarchy::Dao>(&dao, None)
.expect("Dao not found");
Expand Down Expand Up @@ -273,7 +273,7 @@ pub fn add_liqidity(
liquidity_provider: Pubkey,
params: futarchy::ProvideLiquidityParams,
message: Option<&str>,
) -> TransactionResult {
) -> TridentTransactionResult {
let dao_data = trident
.get_account_with_type::<futarchy::Dao>(&dao, None)
.expect("Dao not found");
Expand Down Expand Up @@ -328,7 +328,7 @@ pub fn withdraw_liquidity(
liquidity_provider: Pubkey,
params: futarchy::WithdrawLiquidityParams,
message: Option<&str>,
) -> TransactionResult {
) -> TridentTransactionResult {
let dao_data = trident
.get_account_with_type::<futarchy::Dao>(&dao, None)
.expect("Dao not found");
Expand Down Expand Up @@ -395,7 +395,7 @@ pub fn conditional_swap(
quote_vault: Pubkey,
params: futarchy::ConditionalSwapParams,
message: Option<&str>,
) -> TransactionResult {
) -> TridentTransactionResult {
let dao_data = trident
.get_account_with_type::<futarchy::Dao>(&dao, None)
.expect("Dao not found");
Expand Down Expand Up @@ -488,7 +488,7 @@ pub fn finalize_proposal(
base_vault: Pubkey,
quote_vault: Pubkey,
message: Option<&str>,
) -> TransactionResult {
) -> TridentTransactionResult {
let dao_data = trident
.get_account_with_type::<futarchy::Dao>(&dao, None)
.expect("Dao not found");
Expand Down
4 changes: 2 additions & 2 deletions trident-tests/common/squads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn initialize_vault_transaction(

let res = trident.process_transaction(&[vault_tx_create], message);

assert!(res.is_success());
invariant!(res.is_success());
}

pub fn initialize_squads_proposal(
Expand Down Expand Up @@ -66,7 +66,7 @@ pub fn initialize_squads_proposal(

let res = trident.process_transaction(&[create_proposal], message);

assert!(res.is_success());
invariant!(res.is_success());

squads_proposal
}
8 changes: 4 additions & 4 deletions trident-tests/common/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub fn initialize_mint(
) {
let ix = trident.initialize_mint(&payer, &mint, decimals, &owner, freeze_authority);
let res = trident.process_transaction(&ix, message);
assert!(res.is_success());
invariant!(res.is_success());
}

pub fn initialize_associated_token_account(
Expand All @@ -33,7 +33,7 @@ pub fn initialize_associated_token_account(
let ix = trident.initialize_associated_token_account(&payer, &mint, &owner);
let res = trident.process_transaction(&[ix], None);

assert!(res.is_success());
invariant!(res.is_success());
}
}

Expand All @@ -56,7 +56,7 @@ pub fn mint_to(

let res = trident.process_transaction(&[mint], None);

assert!(res.is_success());
invariant!(res.is_success());
}

pub fn get_or_initialize_associated_token_account(
Expand All @@ -70,7 +70,7 @@ pub fn get_or_initialize_associated_token_account(
if trident.get_token_account(ata).is_err() {
let ix = trident.initialize_associated_token_account(&payer, &mint, &owner);
let res = trident.process_transaction(&[ix], None);
assert!(res.is_success());
invariant!(res.is_success());
}

ata
Expand Down
Loading
Loading