Skip to content

Commit c26075a

Browse files
authored
fix: pass --append flag through to batch creator update (#383)
* test: document that update creators-all --append flag is ignored * fix: pass --append flag through to batch creator update
1 parent 407ddba commit c26075a

16 files changed

Lines changed: 71 additions & 1 deletion

src/burn/burn_asset.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ pub async fn burn_asset_all(args: BurnAssetAllArgs) -> AnyResult<()> {
8282
mint_list,
8383
cache_file: args.cache_file,
8484
new_value: NewValue::None,
85+
should_append: false,
8586
rate_limit: args.rate_limit,
8687
retries: args.retries,
8788
priority: args.priority,

src/burn/burn_legacy.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ pub async fn burn_all(args: BurnAllArgs) -> AnyResult<()> {
140140
mint_list,
141141
cache_file: args.cache_file,
142142
new_value: NewValue::None,
143+
should_append: false,
143144
rate_limit: args.rate_limit,
144145
retries: args.retries,
145146
priority: args.priority,
@@ -243,6 +244,7 @@ pub async fn burn_print_all(args: BurnPrintAllArgs) -> AnyResult<()> {
243244
mint_list,
244245
cache_file: args.cache_file,
245246
new_value: NewValue::Single(args.master_mint),
247+
should_append: false,
246248
rate_limit: args.rate_limit,
247249
retries: args.retries,
248250
priority: args.priority,

src/cache/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ pub struct BatchActionArgs {
110110
pub mint_list: Option<Vec<String>>,
111111
pub cache_file: Option<String>,
112112
pub new_value: NewValue,
113+
pub should_append: bool,
113114
pub rate_limit: usize,
114115
pub retries: u8,
115116
pub priority: Priority,
@@ -121,6 +122,7 @@ pub struct RunActionArgs {
121122
pub payer: Arc<Option<Keypair>>,
122123
pub mint_account: String,
123124
pub new_value: String,
125+
pub should_append: bool,
124126
pub priority: Priority,
125127
}
126128

@@ -345,6 +347,7 @@ pub trait Action {
345347
payer: payer.clone(),
346348
mint_account: mint_address,
347349
new_value: new_value.to_string(),
350+
should_append: args.should_append,
348351
priority: args.priority.clone(),
349352
});
350353

src/unverify/creator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ pub async fn unverify_creator_all(args: UnverifyCreatorAllArgs) -> AnyResult<()>
103103
mint_list,
104104
cache_file: args.cache_file,
105105
new_value: NewValue::None,
106+
should_append: false,
106107
rate_limit: args.rate_limit,
107108
retries: args.retries,
108109
priority: args.priority,

src/update/creator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ pub async fn update_creator_all(args: UpdateCreatorAllArgs) -> AnyResult<()> {
101101
mint_list,
102102
cache_file: args.cache_file,
103103
new_value: NewValue::Single(args.new_creators),
104+
should_append: args.should_append,
104105
rate_limit: args.rate_limit,
105106
retries: args.retries,
106107
priority: args.priority,
@@ -122,7 +123,7 @@ impl Action for UpdateCreatorAll {
122123
keypair: args.keypair,
123124
mint_account: args.mint_account,
124125
new_creators: args.new_value,
125-
should_append: false,
126+
should_append: args.should_append,
126127
priority: args.priority,
127128
})
128129
.await

src/update/data.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ pub async fn update_data_all(args: UpdateDataAllArgs) -> AnyResult<()> {
162162
mint_list,
163163
cache_file: args.cache_file,
164164
new_value: NewValue::List(mint_values),
165+
should_append: false,
165166
rate_limit: args.rate_limit,
166167
retries: args.retries,
167168
priority: args.priority,

src/update/immutable.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ pub async fn set_immutable_all(args: SetImmutableAllArgs) -> AnyResult<()> {
8181
mint_list,
8282
cache_file: args.cache_file,
8383
new_value: NewValue::None,
84+
should_append: false,
8485
rate_limit: args.rate_limit,
8586
retries: args.retries,
8687
priority: args.priority,

src/update/primary_sale_happened.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ pub async fn set_primary_sale_happened_all(args: SetPrimarySaleHappenedAllArgs)
8181
mint_list,
8282
cache_file: args.cache_file,
8383
new_value: NewValue::None,
84+
should_append: false,
8485
rate_limit: args.rate_limit,
8586
retries: args.retries,
8687
priority: args.priority,

src/update/rule_set.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ pub async fn update_rule_set_all(args: UpdateRuleSetAllArgs) -> AnyResult<()> {
131131
mint_list,
132132
cache_file: args.cache_file,
133133
new_value: NewValue::Single(args.new_rule_set),
134+
should_append: false,
134135
rate_limit: args.rate_limit,
135136
retries: args.retries,
136137
priority: args.priority,
@@ -174,6 +175,7 @@ pub async fn clear_rule_set_all(args: ClearRuleSetAllArgs) -> AnyResult<()> {
174175
mint_list,
175176
cache_file: args.cache_file,
176177
new_value: NewValue::None,
178+
should_append: false,
177179
rate_limit: args.rate_limit,
178180
retries: args.retries,
179181
priority: args.priority,

src/update/seller_fee_basis_points.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ pub async fn update_sfbp_all(args: UpdateSellerFeeBasisPointsAllArgs) -> AnyResu
103103
mint_list,
104104
cache_file: args.cache_file,
105105
new_value: NewValue::Single(args.new_sfbp.to_string()),
106+
should_append: false,
106107
rate_limit: args.rate_limit,
107108
retries: args.retries,
108109
priority: args.priority,

0 commit comments

Comments
 (0)