0

I am writing a smart contract in Rust using the Openbrush library. I am using version 3.0.0.

pub const STORAGE_KEY: u32 = openbrush::storage_unique_key!(metaData);
#[openbrush::upgradeable_storage(STORAGE_KEY)]
#[derive(Default, Debug)]
pub struct metaData {
        
}
#[ink(storage)]
#[derive(Default, Storage)]
pub struct PeerNftcontract {
    #[storage_field]
    data: metaData
}

I am using this code for changing the storage in upgradable smart contracts. and whatever field I have to change I am writing in the metaData struct. but it was not working. can anyone help me out here ?

4
  • Have you looked at: use.ink/basics/upgradeable-contracts ? Commented Sep 18, 2023 at 13:52
  • yes, I have seen the documentation but they have not written much there. Commented Sep 18, 2023 at 14:28
  • Please clarify your question, it is not clear what you are asking at the moment Commented Sep 19, 2023 at 14:26
  • Why is not working? any error with the compilation?
    – Alex Bean
    Commented Nov 8, 2023 at 9:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.