Skip to content

Commit

Permalink
fix(validator): idl and new id
Browse files Browse the repository at this point in the history
  • Loading branch information
ogmedia committed Nov 21, 2022
1 parent aa189e1 commit d6fafd5
Show file tree
Hide file tree
Showing 3 changed files with 248 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Anchor.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ squads_mpl = "84Ue9gKQUsStFJQCNQpsqvbceo7fKYSSCCMXxMZ5PkiW"
program_manager = "8Y5Qbdb67Ka4LcPCziyhLrGbYN2ftZ1BG11Q5PiHenLP"
mesh = "5mt41y2huXBXb8HSkMiNexABuk8GVEmrgZqEgauGtV4y"
txmeta = "5o4wQhxotU8rVz6iK1VowzyX53z3HuznvhvYYCMZn875"
validator = "FnVHo2S6NxqaGT8buKCzxs8njaZEUkA9aRQNU87ASFyv"

[programs.devnet]
squads_mpl = "SMPLecH534NA9acpos4G6x7uf3LWbCAwZQE9e8ZekMu"
Expand All @@ -23,6 +24,7 @@ squads_mpl = "SMPLecH534NA9acpos4G6x7uf3LWbCAwZQE9e8ZekMu"
program_manager = "SMPLKTQhrgo22hFCVq2VGX1KAktTWjeizkhrdB1eauK"
mesh = "SMPLVC8MxZ5Bf5EfF7PaMiTCxoBAcmkbM2vkrvMK8ho"
txmeta = "SMPL5bz5ERMdweouWrXtk3jmb6FnjZkWf7pHDsE6Zwz"
validator = "SMPLbiNbsa19gf9jz8x9uHSvSn9VLFJB38dGy46kqJ7"

[registry]
url = "https://anchor.projectserum.com"
Expand Down
245 changes: 245 additions & 0 deletions idl/validator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
export type Validator = {
"version": "0.1.0",
"name": "validator",
"instructions": [
{
"name": "createValidatorManager",
"accounts": [
{
"name": "multisig",
"isMut": false,
"isSigner": false
},
{
"name": "validatorManager",
"isMut": true,
"isSigner": false
},
{
"name": "creator",
"isMut": true,
"isSigner": true
},
{
"name": "systemProgram",
"isMut": false,
"isSigner": false
}
],
"args": []
},
{
"name": "createManagedValidator",
"accounts": [
{
"name": "multisig",
"isMut": false,
"isSigner": false
},
{
"name": "validatorManager",
"isMut": true,
"isSigner": false
},
{
"name": "managedValidator",
"isMut": true,
"isSigner": false
},
{
"name": "creator",
"isMut": true,
"isSigner": true
},
{
"name": "systemProgram",
"isMut": false,
"isSigner": false
}
],
"args": [
{
"name": "validatorAddress",
"type": "publicKey"
},
{
"name": "name",
"type": "string"
}
]
}
],
"accounts": [
{
"name": "validatorManager",
"type": {
"kind": "struct",
"fields": [
{
"name": "multisig",
"type": "publicKey"
},
{
"name": "managedValidatorIndex",
"type": "u32"
},
{
"name": "bump",
"type": "u8"
}
]
}
},
{
"name": "managedValidator",
"type": {
"kind": "struct",
"fields": [
{
"name": "managedValidatorIndex",
"type": "u32"
},
{
"name": "validatorAddress",
"type": "publicKey"
},
{
"name": "multisig",
"type": "publicKey"
},
{
"name": "bump",
"type": "u8"
},
{
"name": "name",
"type": "string"
}
]
}
}
]
};

export const IDL: Validator = {
"version": "0.1.0",
"name": "validator",
"instructions": [
{
"name": "createValidatorManager",
"accounts": [
{
"name": "multisig",
"isMut": false,
"isSigner": false
},
{
"name": "validatorManager",
"isMut": true,
"isSigner": false
},
{
"name": "creator",
"isMut": true,
"isSigner": true
},
{
"name": "systemProgram",
"isMut": false,
"isSigner": false
}
],
"args": []
},
{
"name": "createManagedValidator",
"accounts": [
{
"name": "multisig",
"isMut": false,
"isSigner": false
},
{
"name": "validatorManager",
"isMut": true,
"isSigner": false
},
{
"name": "managedValidator",
"isMut": true,
"isSigner": false
},
{
"name": "creator",
"isMut": true,
"isSigner": true
},
{
"name": "systemProgram",
"isMut": false,
"isSigner": false
}
],
"args": [
{
"name": "validatorAddress",
"type": "publicKey"
},
{
"name": "name",
"type": "string"
}
]
}
],
"accounts": [
{
"name": "validatorManager",
"type": {
"kind": "struct",
"fields": [
{
"name": "multisig",
"type": "publicKey"
},
{
"name": "managedValidatorIndex",
"type": "u32"
},
{
"name": "bump",
"type": "u8"
}
]
}
},
{
"name": "managedValidator",
"type": {
"kind": "struct",
"fields": [
{
"name": "managedValidatorIndex",
"type": "u32"
},
{
"name": "validatorAddress",
"type": "publicKey"
},
{
"name": "multisig",
"type": "publicKey"
},
{
"name": "bump",
"type": "u8"
},
{
"name": "name",
"type": "string"
}
]
}
}
]
};
2 changes: 1 addition & 1 deletion programs/validator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use squads_mpl::state::*;
use squads_mpl::errors::*;
pub mod state;

declare_id!("FnVHo2S6NxqaGT8buKCzxs8njaZEUkA9aRQNU87ASFyv");
declare_id!("SMPLbiNbsa19gf9jz8x9uHSvSn9VLFJB38dGy46kqJ7");

#[program]
pub mod validator {
Expand Down

0 comments on commit d6fafd5

Please sign in to comment.