Skip to content

Modules and Initialization

In Move, the closest code-level equivalent of a Solidity contract is a module.

pragma solidity ^0.8.20;
contract Billboard {
constructor(address owner_) {
// initialization
}
}
module billboard_address::billboard {
fun init_module(owner: &signer) {
// initialization
}
}
  • Solidity declares contracts with the contract keyword. Move declares modules as address::module_name.
  • Solidity constructors run once at deployment. Move initialization logic typically lives in init_module.
  • Package metadata and named addresses live in Move.toml, not inline in the module.
[package]
name = "billboard"
version = "1.0.0"
[addresses]
billboard_address = "_"

For production deployments, also evaluate deploying code as an object and package upgrade policy. The core migration point is that initialization is still explicit, but the packaging and address model are different.