Skip to content
This repository has been archived by the owner on Feb 9, 2025. It is now read-only.

Commit

Permalink
Quadratic Voting: Missing fields in the IDL
Browse files Browse the repository at this point in the history
  • Loading branch information
dankelleher committed Dec 26, 2023
1 parent 6805a03 commit 98961a9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion programs/quadratic/src/instructions/create_registrar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use spl_governance::state::realm;
/// Creates a Plugin Registrar for spl-gov Realm
/// This instruction should only be executed once per realm/governing_token_mint to create the account
#[derive(Accounts)]
#[instruction(use_previous_voter_weight_plugin:bool)]
#[instruction(coefficients: QuadraticCoefficients, use_previous_voter_weight_plugin:bool)]
pub struct CreateRegistrar<'info> {
/// The quadratic Registrar
/// There can only be a single registrar per governance Realm and governing mint of the Realm
Expand Down
41 changes: 41 additions & 0 deletions src/quadraticVoter/quadratic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ export const IDL: Idl = {
}
],
"args": [
{
"name": "coefficients",
"type": {
"defined": "QuadraticCoefficients"
}
},
{
"name": "usePreviousVoterWeightPlugin",
"type": "bool"
Expand Down Expand Up @@ -108,6 +114,12 @@ export const IDL: Idl = {
}
],
"args": [
{
"name": "coefficients",
"type": {
"defined": "QuadraticCoefficients"
}
},
{
"name": "usePreviousVoterWeightPlugin",
"type": "bool"
Expand Down Expand Up @@ -351,6 +363,15 @@ export const IDL: Idl = {
"option": "publicKey"
}
},
{
"name": "quadraticCoefficients",
"docs": [
"A set of coefficients to be used when calculating the voter weight"
],
"type": {
"defined": "QuadraticCoefficients"
}
},
{
"name": "reserved",
"docs": [
Expand Down Expand Up @@ -463,6 +484,26 @@ export const IDL: Idl = {
}
],
"types": [
{
"name": "QuadraticCoefficients",
"type": {
"kind": "struct",
"fields": [
{
"name": "a",
"type": "f64"
},
{
"name": "b",
"type": "f64"
},
{
"name": "c",
"type": "f64"
}
]
}
},
{
"name": "VoterWeightAction",
"docs": [
Expand Down

0 comments on commit 98961a9

Please sign in to comment.