Skip to content

Commit b43d431

Browse files
committed
feat(multisig_change_threshold): expose instruction
1 parent 0aac294 commit b43d431

File tree

4 files changed

+188
-0
lines changed

4 files changed

+188
-0
lines changed

programs/squads_multisig_program/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ pub mod squads_multisig_program {
5555
MultisigConfig::multisig_set_time_lock(ctx, args)
5656
}
5757

58+
/// Set the `threshold` config parameter for the controlled multisig.
59+
pub fn multisig_change_threshold(
60+
ctx: Context<MultisigConfig>,
61+
args: MultisigChangeThresholdArgs,
62+
) -> Result<()> {
63+
MultisigConfig::multisig_change_threshold(ctx, args)
64+
}
65+
5866
/// Set the multisig `config_authority`.
5967
pub fn multisig_set_config_authority(
6068
ctx: Context<MultisigConfig>,

sdk/multisig/idl/squads_multisig_program.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,55 @@
192192
}
193193
]
194194
},
195+
{
196+
"name": "multisigChangeThreshold",
197+
"docs": [
198+
"Set the `threshold` config parameter for the controlled multisig."
199+
],
200+
"accounts": [
201+
{
202+
"name": "multisig",
203+
"isMut": true,
204+
"isSigner": false
205+
},
206+
{
207+
"name": "configAuthority",
208+
"isMut": false,
209+
"isSigner": true,
210+
"docs": [
211+
"Multisig `config_authority` that must authorize the configuration change."
212+
]
213+
},
214+
{
215+
"name": "rentPayer",
216+
"isMut": true,
217+
"isSigner": true,
218+
"isOptional": true,
219+
"docs": [
220+
"The account that will be charged or credited in case the multisig account needs to reallocate space,",
221+
"for example when adding a new member or a spending limit.",
222+
"This is usually the same as `config_authority`, but can be a different account if needed."
223+
]
224+
},
225+
{
226+
"name": "systemProgram",
227+
"isMut": false,
228+
"isSigner": false,
229+
"isOptional": true,
230+
"docs": [
231+
"We might need it in case reallocation is needed."
232+
]
233+
}
234+
],
235+
"args": [
236+
{
237+
"name": "args",
238+
"type": {
239+
"defined": "MultisigChangeThresholdArgs"
240+
}
241+
}
242+
]
243+
},
195244
{
196245
"name": "multisigSetConfigAuthority",
197246
"docs": [

sdk/multisig/src/generated/instructions/index.ts

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/multisig/src/generated/instructions/multisigChangeThreshold.ts

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

0 commit comments

Comments
 (0)