Trait Upgradable

Source
pub trait Upgradable {
    // Required methods
    fn get_staging_duration(&self) -> U64;
    fn stage_code(&mut self, code: Vec<u8>, timestamp: Timestamp);
    fn deploy_code(&mut self) -> Promise;

    // Provided method
    fn migrate(&mut self) { ... }
}
๐Ÿ‘ŽDeprecated since 4.1.0: This was removed because there is no standard (NEP) for upgradable contracts.

Required Methodsยง

Source

fn get_staging_duration(&self) -> U64

๐Ÿ‘ŽDeprecated since 4.1.0: This was removed because there is no standard (NEP) for upgradable contracts.
Source

fn stage_code(&mut self, code: Vec<u8>, timestamp: Timestamp)

๐Ÿ‘ŽDeprecated since 4.1.0: This was removed because there is no standard (NEP) for upgradable contracts.
Source

fn deploy_code(&mut self) -> Promise

๐Ÿ‘ŽDeprecated since 4.1.0: This was removed because there is no standard (NEP) for upgradable contracts.

Provided Methodsยง

Source

fn migrate(&mut self)

๐Ÿ‘ŽDeprecated since 4.1.0: This was removed because there is no standard (NEP) for upgradable contracts.

Implement migration for the next version. Should be unimplemented for a new contract. TODO: consider adding version of the contract stored in the storage?

Implementorsยง