https://github.com/code-423n4/2024-08-axelar-network/blob/69c4f2c3fcefb1b8eb2129af9c3685a44ae5b6fe/axelar-amplifier/contracts/axelarnet-gateway/src/contract.rs#L15-L17
https://github.com/code-423n4/2024-08-axelar-network/blob/69c4f2c3fcefb1b8eb2129af9c3685a44ae5b6fe/axelar-amplifier/interchain-token-service/src/contract.rs#L42-L50
This function is used to migrate; however, its implementation is incomplete cause it doesnt set neither the contracts version or name.
The correct implementation can be seen here in ITS Hubs gateway implementation.
Also from CosmWasms docs on migration, we can see how its expected to call set_contract_version() during migration.
This absence of proper version/name management could make it impossible to implement version-specific migration logic or prevent incompatible migrations, since we are not updating and checking the contract version during migration.
Since set_contract_version is called in the instantiate function, it is not being atomically executed during migration, leaving the version information outdated after each migration.
Implement proper version management in the migrate function.
Pseudo fix:
