ディレクトリ構成

aptogotchi
├── Move.toml      (required)
├── sources\\       (required, stores move modules)
│   └── aptogotchi.move
├── build\\         (generated, build output)
├── scripts\\       (optional, stores move scripts)
│   └── script_batch_create_gotchi.move
├── doc_templates\\ (optional)
|── tests\\         (optional, test mode)
└── examples\\      (optional, test & dev mode)

Move.toml

[package]
name = "aptogotchi"
version = "1.0.0"
upgrade_policy = "compatible"

[addresses]
aptogotchi = "_"

[dependencies]
AptosFramework = {
	git = "<https://github.com/aptos-labs/aptos-core.git>",
	rev = "main",
	subdir = "aptos-move/framework/aptos-framework"
}
AptosTokenObjects = {
	git = "<https://github.com/aptos-labs/aptos-core.git>",
	rev = "main",
    subdir = "aptos-move/framework/aptos-token-objects"
}

# Mock address for unit test.
[dev-addresses]
aptogotchi = "0x123"

Module

module aptogotchi::main {

	  struct Config has copy, drop {
	  	admin: address
	  }

      // Init function runs once when the module is published for the first time.
	  fun init_module(caller: &signer) {
        let caller_addr = address_of(caller);

        // move_to is a function to move the struct to the global storage
        move_to(caller, Config { admin: caller_addr });
    }

    #[view]
    public fun get_admin(): address acquires Config {
        // @aptogotchi is the address of the module
        let config = borrow_global<Config>(@aptogotchi);

        config.admin
    }
}