Timeline for How to create Global authority for pool
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 13, 2022 at 9:01 | history | edited | Ademola | CC BY-SA 4.0 |
added 267 characters in body
|
Aug 1, 2022 at 11:39 | comment | added | Ademola | What about in your validator? | |
Aug 1, 2022 at 11:31 | comment | added | PenandWeb | yes... rebuilding and redeploying after every change... pub const GLOBAL_AUTHORITY_SEED: &[u8] = "global-authority".as_bytes(); and, seeds = &[GLOBAL_AUTHORITY_SEED]; | |
Aug 1, 2022 at 11:28 | comment | added | Ademola | Send your new const definition, and also your seeds for global_authority in the validator. Did you rebuild and redeploy? | |
Aug 1, 2022 at 11:25 | comment | added | PenandWeb | not working, facing the same error. any other way to give global authority? | |
Aug 1, 2022 at 11:01 | comment | added | Ademola |
Oh! The problem is defining GLOBAL_AUTHORITY_SEEDS as a &str. Change the definition to pub const GLOBAL_AUTHORITY_SEED: &[u8] = "global-authority".as_bytes() . Then in the validator your seed would simply be GLOBAL_AUTHORITY_SEED .
|
|
Aug 1, 2022 at 10:34 | comment | added | PenandWeb | Just tried it ... but same error..!! | |
Aug 1, 2022 at 10:02 | comment | added | Ademola |
In that case your seeds should be [GLOBAL_AUTHORITY_SEED].as_bytes().as_ref()
|
|
Aug 1, 2022 at 9:55 | comment | added | PenandWeb | its string: pub const GLOBAL_AUTHORITY_SEED: &str = "global-authority"; | |
Aug 1, 2022 at 9:54 | comment | added | Ademola | What is your 'GLOBAL_AUTHORITY_SEED'? | |
Aug 1, 2022 at 9:49 | comment | added | PenandWeb |
Switching as_bytes to as_ref it is giving error on compilation time: expected reference &[&[&[u8]]] found reference &[&[&[u8; 1]]; 1] also, have tried using as_byte on both sides. same results for me.
|
|
Aug 1, 2022 at 9:36 | history | answered | Ademola | CC BY-SA 4.0 |