Skip to content

Commit 6b244a8

Browse files
authored
Merge pull request #5 from Ackee-Blockchain/ackee-fuzz-tests-rebase
Ackee fuzz tests rebase
2 parents bbb2ceb + 0981b1b commit 6b244a8

9 files changed

Lines changed: 75 additions & 102 deletions

File tree

trident-tests/common/futarchy.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ pub fn stake_to_proposal(
146146
staker,
147147
payer,
148148
TOKEN_PROGRAM_ID,
149-
ASSOCIATED_TOKEN_PROGRAM_ID,
150149
solana_sdk::system_program::ID,
151150
event_authority,
152151
futarchy::program_id(),
@@ -155,7 +154,12 @@ pub fn stake_to_proposal(
155154

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

158-
invariant!(res.is_success());
157+
invariant!(
158+
res.is_success(),
159+
"Stake to proposal failed: {:#?},log: {}",
160+
res.status(),
161+
res.logs()
162+
);
159163
}
160164

161165
#[allow(clippy::too_many_arguments)]

trident-tests/common/types.rs

Lines changed: 21 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,8 +2032,6 @@ pub mod launchpad_v_7 {
20322032

20332033
pub fundingRecord: AccountMeta,
20342034

2035-
pub launchSigner: AccountMeta,
2036-
20372035
pub launchQuoteVault: AccountMeta,
20382036

20392037
pub funder: AccountMeta,
@@ -2058,8 +2056,6 @@ pub mod launchpad_v_7 {
20582056

20592057
pub fundingRecord: Pubkey,
20602058

2061-
pub launchSigner: Pubkey,
2062-
20632059
pub launchQuoteVault: Pubkey,
20642060

20652061
pub funder: Pubkey,
@@ -2083,8 +2079,6 @@ pub mod launchpad_v_7 {
20832079

20842080
fundingRecord: Pubkey,
20852081

2086-
launchSigner: Pubkey,
2087-
20882082
launchQuoteVault: Pubkey,
20892083

20902084
funder: Pubkey,
@@ -2106,8 +2100,6 @@ pub mod launchpad_v_7 {
21062100

21072101
fundingRecord,
21082102

2109-
launchSigner,
2110-
21112103
launchQuoteVault,
21122104

21132105
funder,
@@ -2158,8 +2150,6 @@ pub mod launchpad_v_7 {
21582150

21592151
self.accounts.fundingRecord = AccountMeta::new(accounts.fundingRecord, false);
21602152

2161-
self.accounts.launchSigner = AccountMeta::new_readonly(accounts.launchSigner, false);
2162-
21632153
self.accounts.launchQuoteVault = AccountMeta::new(accounts.launchQuoteVault, false);
21642154

21652155
self.accounts.funder = AccountMeta::new_readonly(accounts.funder, true);
@@ -2192,8 +2182,6 @@ pub mod launchpad_v_7 {
21922182

21932183
metas.push(self.accounts.fundingRecord.clone());
21942184

2195-
metas.push(self.accounts.launchSigner.clone());
2196-
21972185
metas.push(self.accounts.launchQuoteVault.clone());
21982186

21992187
metas.push(self.accounts.funder.clone());
@@ -2805,8 +2793,6 @@ pub mod launchpad_v_7 {
28052793

28062794
pub tokenProgram: AccountMeta,
28072795

2808-
pub systemProgram: AccountMeta,
2809-
28102796
pub eventAuthority: AccountMeta,
28112797

28122798
pub program: AccountMeta,
@@ -2829,8 +2815,6 @@ pub mod launchpad_v_7 {
28292815

28302816
pub tokenProgram: Pubkey,
28312817

2832-
pub systemProgram: Pubkey,
2833-
28342818
pub eventAuthority: Pubkey,
28352819

28362820
pub program: Pubkey,
@@ -2852,8 +2836,6 @@ pub mod launchpad_v_7 {
28522836

28532837
tokenProgram: Pubkey,
28542838

2855-
systemProgram: Pubkey,
2856-
28572839
eventAuthority: Pubkey,
28582840

28592841
program: Pubkey,
@@ -2873,8 +2855,6 @@ pub mod launchpad_v_7 {
28732855

28742856
tokenProgram,
28752857

2876-
systemProgram,
2877-
28782858
eventAuthority,
28792859

28802860
program,
@@ -2921,8 +2901,6 @@ pub mod launchpad_v_7 {
29212901

29222902
self.accounts.tokenProgram = AccountMeta::new_readonly(accounts.tokenProgram, false);
29232903

2924-
self.accounts.systemProgram = AccountMeta::new_readonly(accounts.systemProgram, false);
2925-
29262904
self.accounts.eventAuthority =
29272905
AccountMeta::new_readonly(accounts.eventAuthority, false);
29282906

@@ -2953,8 +2931,6 @@ pub mod launchpad_v_7 {
29532931

29542932
metas.push(self.accounts.tokenProgram.clone());
29552933

2956-
metas.push(self.accounts.systemProgram.clone());
2957-
29582934
metas.push(self.accounts.eventAuthority.clone());
29592935

29602936
metas.push(self.accounts.program.clone());
@@ -3004,8 +2980,6 @@ pub mod launchpad_v_7 {
30042980

30052981
pub tokenProgram: AccountMeta,
30062982

3007-
pub systemProgram: AccountMeta,
3008-
30092983
pub eventAuthority: AccountMeta,
30102984

30112985
pub program: AccountMeta,
@@ -3030,8 +3004,6 @@ pub mod launchpad_v_7 {
30303004

30313005
pub tokenProgram: Pubkey,
30323006

3033-
pub systemProgram: Pubkey,
3034-
30353007
pub eventAuthority: Pubkey,
30363008

30373009
pub program: Pubkey,
@@ -3055,8 +3027,6 @@ pub mod launchpad_v_7 {
30553027

30563028
tokenProgram: Pubkey,
30573029

3058-
systemProgram: Pubkey,
3059-
30603030
eventAuthority: Pubkey,
30613031

30623032
program: Pubkey,
@@ -3078,8 +3048,6 @@ pub mod launchpad_v_7 {
30783048

30793049
tokenProgram,
30803050

3081-
systemProgram,
3082-
30833051
eventAuthority,
30843052

30853053
program,
@@ -3128,8 +3096,6 @@ pub mod launchpad_v_7 {
31283096

31293097
self.accounts.tokenProgram = AccountMeta::new_readonly(accounts.tokenProgram, false);
31303098

3131-
self.accounts.systemProgram = AccountMeta::new_readonly(accounts.systemProgram, false);
3132-
31333099
self.accounts.eventAuthority =
31343100
AccountMeta::new_readonly(accounts.eventAuthority, false);
31353101

@@ -3162,8 +3128,6 @@ pub mod launchpad_v_7 {
31623128

31633129
metas.push(self.accounts.tokenProgram.clone());
31643130

3165-
metas.push(self.accounts.systemProgram.clone());
3166-
31673131
metas.push(self.accounts.eventAuthority.clone());
31683132

31693133
metas.push(self.accounts.program.clone());
@@ -4708,6 +4672,8 @@ pub mod launchpad_v_7 {
47084672
pub additionalTokensAmount: u64,
47094673

47104674
pub accumulatorActivationDelaySeconds: u32,
4675+
4676+
pub hasBidWall: bool,
47114677
}
47124678

47134679
impl InitializeLaunchArgs {
@@ -4737,6 +4703,8 @@ pub mod launchpad_v_7 {
47374703
additionalTokensAmount: u64,
47384704

47394705
accumulatorActivationDelaySeconds: u32,
4706+
4707+
hasBidWall: bool,
47404708
) -> Self {
47414709
Self {
47424710
minimumRaiseAmount,
@@ -4764,6 +4732,8 @@ pub mod launchpad_v_7 {
47644732
additionalTokensAmount,
47654733

47664734
accumulatorActivationDelaySeconds,
4735+
4736+
hasBidWall,
47674737
}
47684738
}
47694739
}
@@ -4960,6 +4930,8 @@ pub mod launchpad_v_7 {
49604930
pub isPerformancePackageInitialized: bool,
49614931

49624932
pub accumulatorActivationDelaySeconds: u32,
4933+
4934+
pub hasBidWall: bool,
49634935
}
49644936

49654937
impl Launch {
@@ -5023,6 +4995,8 @@ pub mod launchpad_v_7 {
50234995
isPerformancePackageInitialized: bool,
50244996

50254997
accumulatorActivationDelaySeconds: u32,
4998+
4999+
hasBidWall: bool,
50265000
) -> Self {
50275001
Self {
50285002
pdaBump,
@@ -5084,6 +5058,8 @@ pub mod launchpad_v_7 {
50845058
isPerformancePackageInitialized,
50855059

50865060
accumulatorActivationDelaySeconds,
5061+
5062+
hasBidWall,
50875063
}
50885064
}
50895065
}
@@ -5874,8 +5850,6 @@ pub mod futarchy {
58745850

58755851
pub tokenProgram: Pubkey,
58765852

5877-
pub associatedTokenProgram: Pubkey,
5878-
58795853
pub systemProgram: Pubkey,
58805854

58815855
pub eventAuthority: Pubkey,
@@ -5901,8 +5875,6 @@ pub mod futarchy {
59015875

59025876
tokenProgram: Pubkey,
59035877

5904-
associatedTokenProgram: Pubkey,
5905-
59065878
systemProgram: Pubkey,
59075879

59085880
eventAuthority: Pubkey,
@@ -5926,8 +5898,6 @@ pub mod futarchy {
59265898

59275899
tokenProgram,
59285900

5929-
associatedTokenProgram,
5930-
59315901
systemProgram,
59325902

59335903
eventAuthority,
@@ -5981,9 +5951,6 @@ pub mod futarchy {
59815951

59825952
self.accounts.tokenProgram = AccountMeta::new_readonly(accounts.tokenProgram, false);
59835953

5984-
self.accounts.associatedTokenProgram =
5985-
AccountMeta::new_readonly(accounts.associatedTokenProgram, false);
5986-
59875954
self.accounts.systemProgram = AccountMeta::new_readonly(accounts.systemProgram, false);
59885955

59895956
self.accounts.eventAuthority =
@@ -6018,8 +5985,6 @@ pub mod futarchy {
60185985

60195986
metas.push(self.accounts.tokenProgram.clone());
60205987

6021-
metas.push(self.accounts.associatedTokenProgram.clone());
6022-
60235988
metas.push(self.accounts.systemProgram.clone());
60245989

60255990
metas.push(self.accounts.eventAuthority.clone());
@@ -14341,7 +14306,6 @@ pub mod performance_package_v_2 {
1434114306
pub recipientAta: Pubkey,
1434214307
pub signer: Pubkey,
1434314308
pub tokenProgram: Pubkey,
14344-
pub associatedTokenProgram: Pubkey,
1434514309
pub mintGovernorProgram: Pubkey,
1434614310
pub mintGovernorEventAuthority: Pubkey,
1434714311
pub eventAuthority: Pubkey,
@@ -14357,7 +14321,6 @@ pub mod performance_package_v_2 {
1435714321
recipientAta: Pubkey,
1435814322
signer: Pubkey,
1435914323
tokenProgram: Pubkey,
14360-
associatedTokenProgram: Pubkey,
1436114324
mintGovernorProgram: Pubkey,
1436214325
mintGovernorEventAuthority: Pubkey,
1436314326
eventAuthority: Pubkey,
@@ -14371,7 +14334,6 @@ pub mod performance_package_v_2 {
1437114334
recipientAta,
1437214335
signer,
1437314336
tokenProgram,
14374-
associatedTokenProgram,
1437514337
mintGovernorProgram,
1437614338
mintGovernorEventAuthority,
1437714339
eventAuthority,
@@ -14412,8 +14374,6 @@ pub mod performance_package_v_2 {
1441214374
self.accounts.recipientAta = AccountMeta::new(accounts.recipientAta, false);
1441314375
self.accounts.signer = AccountMeta::new_readonly(accounts.signer, true);
1441414376
self.accounts.tokenProgram = AccountMeta::new_readonly(accounts.tokenProgram, false);
14415-
self.accounts.associatedTokenProgram =
14416-
AccountMeta::new_readonly(accounts.associatedTokenProgram, false);
1441714377
self.accounts.mintGovernorProgram =
1441814378
AccountMeta::new_readonly(accounts.mintGovernorProgram, false);
1441914379
self.accounts.mintGovernorEventAuthority =
@@ -14438,7 +14398,6 @@ pub mod performance_package_v_2 {
1443814398
metas.push(self.accounts.recipientAta.clone());
1443914399
metas.push(self.accounts.signer.clone());
1444014400
metas.push(self.accounts.tokenProgram.clone());
14441-
metas.push(self.accounts.associatedTokenProgram.clone());
1444214401
metas.push(self.accounts.mintGovernorProgram.clone());
1444314402
metas.push(self.accounts.mintGovernorEventAuthority.clone());
1444414403
metas.push(self.accounts.eventAuthority.clone());
@@ -15080,12 +15039,6 @@ pub mod performance_package_v_2 {
1508015039
}
1508115040
}
1508215041

15083-
#[derive(Debug, BorshDeserialize, BorshSerialize, Clone, PartialEq)]
15084-
pub enum ProposerType {
15085-
Authority,
15086-
Recipient,
15087-
}
15088-
1508915042
#[derive(Debug, BorshDeserialize, BorshSerialize, Clone, PartialEq)]
1509015043
pub enum PackageStatus {
1509115044
Locked,
@@ -15122,7 +15075,8 @@ pub mod performance_package_v_2 {
1512215075
#[derive(Debug, BorshDeserialize, BorshSerialize, Clone, PartialEq)]
1512315076
pub struct ChangeRequest {
1512415077
pub performancePackage: Pubkey,
15125-
pub proposerType: ProposerType,
15078+
pub proposer: Pubkey,
15079+
pub ppCreatedAtTimestamp: i64,
1512615080
pub proposedAt: i64,
1512715081
pub pdaNonce: u32,
1512815082
pub bump: u8,
@@ -15134,7 +15088,8 @@ pub mod performance_package_v_2 {
1513415088
impl ChangeRequest {
1513515089
pub fn new(
1513615090
performancePackage: Pubkey,
15137-
proposerType: ProposerType,
15091+
proposer: Pubkey,
15092+
ppCreatedAtTimestamp: i64,
1513815093
proposedAt: i64,
1513915094
pdaNonce: u32,
1514015095
bump: u8,
@@ -15144,7 +15099,8 @@ pub mod performance_package_v_2 {
1514415099
) -> Self {
1514515100
Self {
1514615101
performancePackage,
15147-
proposerType,
15102+
proposer,
15103+
ppCreatedAtTimestamp,
1514815104
proposedAt,
1514915105
pdaNonce,
1515015106
bump,
@@ -15166,6 +15122,7 @@ pub mod performance_package_v_2 {
1516615122
pub rewardFunction: RewardFunction,
1516715123
pub status: PackageStatus,
1516815124
pub minUnlockTimestamp: i64,
15125+
pub createdAtTimestamp: i64,
1516915126
pub totalRewardsPaidOut: u64,
1517015127
pub seqNum: u64,
1517115128
pub createKey: Pubkey,
@@ -15183,6 +15140,7 @@ pub mod performance_package_v_2 {
1518315140
rewardFunction: RewardFunction,
1518415141
status: PackageStatus,
1518515142
minUnlockTimestamp: i64,
15143+
createdAtTimestamp: i64,
1518615144
totalRewardsPaidOut: u64,
1518715145
seqNum: u64,
1518815146
createKey: Pubkey,
@@ -15198,6 +15156,7 @@ pub mod performance_package_v_2 {
1519815156
rewardFunction,
1519915157
status,
1520015158
minUnlockTimestamp,
15159+
createdAtTimestamp,
1520115160
totalRewardsPaidOut,
1520215161
seqNum,
1520315162
createKey,

0 commit comments

Comments
 (0)