pub fn from_message_by_init_code_hash(msg: &Message, init_code_hash: bool) -> Option<Self> {
        let hdr = msg.int_header()?;
        if hdr.value().grams.is_zero() {
            return None
        }
        let mut storage = AccountStorage::default();
        storage.balance = hdr.value().clone();
        if let Some(init) = msg.state_init() {
            init.code()?;
            let init_code_hash = match init_code_hash {
                true => Some(init.code()?.repr_hash()),
                false => None
            };
            let state_init = init.clone();
            storage.state = AccountState::AccountActive { init_code_hash, state_init };
        } else if hdr.bounce {
            return None
        }
        let mut account = Account::with_stuff(AccountStuff {
            addr: hdr.dst.clone(),
            storage_stat: StorageInfo::default(),
            storage
        });
        account.update_storage_stat().ok()?;
        Some(account)
    }
///
/// Create initialized account from "constructor internal message"
///
Create initialized account from "constructor internal message"
Create initialized account from " constructor internal message "
pub fn from_message_by_init_code_hash(msg: &Message, init_code_hash: bool) -> Option<Self> {
        let hdr = msg.int_header()?;
        if hdr.value().grams.is_zero() {
            return None
        }
        let mut storage = AccountStorage::default();
        storage.balance = hdr.value().clone();
        if let Some(init) = msg.state_init() {
            init.code()?;
            let init_code_hash = match init_code_hash {
                true => Some(init.code()?.repr_hash()),
                false => None
            };
            let state_init = init.clone();
            storage.state = AccountState::AccountActive { init_code_hash, state_init };
        } else if hdr.bounce {
            return None
        }
        let mut account = Account::with_stuff(AccountStuff {
            addr: hdr.dst.clone(),
            storage_stat: StorageInfo::default(),
            storage
        });
        account.update_storage_stat().ok()?;
        Some(account)
    }
pub fn from_message_by_init_code_hash ( msg : & Message , init_code_hash : bool ) -> Option < Self > { let hdr = msg . int_header ( ) ? ; if hdr . value ( ) . grams . is_zero ( ) { return None } let mut storage = AccountStorage :: default ( ) ; storage . balance = hdr . value ( ) . clone ( ) ; if let Some ( init ) = msg . state_init ( ) { init . code ( ) ? ; let init_code_hash = match init_code_hash { true => Some ( init . code ( ) ? . repr_hash ( ) ) , false => None } ; let state_init = init . clone ( ) ; storage . state = AccountState :: AccountActive { init_code_hash , state_init } ; } else if hdr . bounce { return None } let mut account = Account :: with_stuff ( AccountStuff { addr : hdr . dst . clone ( ) , storage_stat : StorageInfo :: default ( ) , storage } ) ; account . update_storage_stat ( ) . ok ( ) ? ; Some ( account ) }
Create initialized account from "constructor internal message"
Create initialized account from " constructor internal message "
msg
&Message
init_code_hash
bool
msg
&Message
init_code_hash
bool