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);
#[derive(Default, Debug)]
pub struct metaData {
#[derive(Default, Storage)]
pub struct PeerNftcontract {
    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 ?



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.