Hi, Can you add more comment each line in this function please?
I'm not quite understand why we kill organisationNew there.
To perform upgrade, we should kill old one and replace/refer to new one isn't it?
(Yes I'm confusing maybe it's just naming)
function upgradeOrganisation(bytes32 key_)
{
// Refer to old address
address organisationAddress = organisations[key_];
// Here's is old organisation
var organisation = Organisation(organisationAddress);
var tokenLedger = organisation.tokenLedger();
var eternalStorage = organisation.eternalStorage();
// Define new organisation
OrganisationUpdated organisationNew = new OrganisationUpdated(tokenLedger, eternalStorage);
// Kill that new organisation? (I don't get this line)
organisation.kill(organisationNew);
// Point to killed organisation?
organisations[key_] = organisationNew;
// Then upgrade killed organisation?
OrganisationUpgraded(organisationNew, now);
}
Hi, Can you add more comment each line in this function please?
I'm not quite understand why we kill
organisationNew
there. To perform upgrade, we should kill old one and replace/refer to new one isn't it? (Yes I'm confusing maybe it's just naming)Thanks!