Quick Start Guide
Description:
Main Content:
use smartcache_sdk::{is_contract_cacheable, AutoCacheOptIn, emit_cache_opt_in};
use stylus_sdk::prelude::*;
use alloy_primitives::Address;
#[public]
impl MyContract {
pub fn is_cacheable(&self) -> bool {
is_contract_cacheable()
}
pub fn opt_into_cache(&self, contract_addr: Address) {
emit_cache_opt_in(contract_addr);
}
}Last updated