fvm-macros 1.0.0

provide the macros for user to write contract more convenient
Documentation
use fvm_macros::contract;
use fvm_macros::storage;
use fvm_std::runtime;
use scale::{Decode, Encode};
use fvm_std::collections::hyper_map::HyperMap;

#[storage]
pub struct SetHash {
    map: HyperMap<String, String>,
}

#[contract]
impl SetHash {
    fn new() -> Self {
        Self { map: HyperMap::new() }
    }

    pub fn set_hash(&mut self, key: String, value: String) {
        self.map.insert(key, value);
    }

    pub fn get_hash(&mut self, key: String) -> &String {
        self.map.get(&key).unwrap()
    }
}

fn main() {}