Can someone, please, explain, how this works:
I have contract MigrationAgent
which has migrateFrom()
function (not implemented). And I have NewContract
is MigrationAgent
which implements migrateFrom()
. I deployed that contract, have its address 0x*****
.
To call this function from other contract, as I see in example, I have to do this: MigrationAgent(0x*****).migrateFrom();
Why is this? I can't understand logic of this syntax. Why can't I write 0x*****.migrateFrom()
and what if I write MigrationAgent(0x*****).migrateFrom()
when 0x*****
is not MigrationAgent
?