Working with Contract Custom Types
Use directly your custom contract types inside a Zephyr program.
Import the custom type
#[derive(Clone)]
#[contracttype]
pub enum PoolFactoryDataKey {
Contracts(Address),
}Use the type in your flow
for entry in entries {
if let Ok(entry) = env.try_from_scval(&entry.key) {
let PoolFactoryDataKey::Contracts(address) = entry;
pools.push(address)
}
}Last updated