In Scrypto, I have folder structure like:
src/
├── lib.rs
├── script.rs
├── custom_types
│ └── type.rs
In type.rs, I have the following defined:
use sbor::*;
#[derive(TypeId, Encode, Decode, Describe)]
pub struct Date {
year: u8,
day: u8,
month: u8,
}
I want to be able to use the Date struct in script.rs how do I do it?
Organize files like:
mod.rs:Add the following to
script.rs:Finally, add the following to
lib.rs