module verifier_addr::fri { use std::signer::address_of; use aptos_std::simple_map::{new, SimpleMap}; friend verifier_addr::fri_statement; friend verifier_addr::fri_layer; friend verifier_addr::merkle_verifier; struct Fri has key, store, drop { fri: SimpleMap } public(friend) fun init_fri(account: &signer) { if (!exists(address_of(account))) { let fri = new(); move_to(account, Fri { fri }); } } public(friend) fun get_fri(signer: address): SimpleMap acquires Fri { borrow_global_mut(signer).fri } public(friend) fun update_fri(signer: &signer, fri: SimpleMap) acquires Fri { borrow_global_mut(address_of(signer)).fri = fri; } public entry fun reset_memory_fri(signer: &signer) acquires Fri { //TODO: assert admin move_from(address_of(signer)); } #[view] public fun view_fri(signer: address): SimpleMap acquires Fri { let fri = borrow_global(signer).fri; fri } }