0x2bitcoin
@0x2bitcoin.eth
#![cfg_attr(not(feature = "std"), no_std)] #[ink::contract] mod photo_storage { #[ink(storage)] pub struct PhotoStorage { ipfs_hash: Option<String>, } impl PhotoStorage { #[ink(constructor)] pub fn new() -> Self { Self { ipfs_hash: None } } #[ink(message)] pub fn set_ipfs_hash(&mut self, hash: String) { self.ipfs_hash = Some(hash); } #[ink(message)] pub fn get_ipfs_hash(&self) -> Option<String> { self.ipfs_hash.clone() } } }
0 reply
0 recast
0 reaction