// manageCreation creates an Algorand application for the target account.
// For this to work, the account needs to be valid (i.e. have no registered
// app and enough funding).
manageCreation creates an Algorand application for the target account.
For this to work, the account needs to be valid .
// manageCreation creates an Algorand application for the target account . // For this to work the account needs to be valid ( i . e . have no registered // app and enough funding ) .
func (ab *AlgorandBuffer) manageCreation() error {
	info, err := ab.Client.AccountInformation(ab.AccountCrypt.Address.String(), context.Background())
	if err != nil {
		return err
	}
	if client.ValidAccount(info) {
		return nil
	}
	if len(info.CreatedApps) > 0 {
		return errors.New("must delete invalid applications before creating new one")
	}
	appId, err := ab.Client.CreateApplication(ab.AccountCrypt, client.ApproveTeal, client.ClearTeal)
	if err != nil {
		return err
	}
	ab.AppId = appId
	return nil
}
func ( ab * AlgorandBuffer ) manageCreation ( ) error { info , err := ab . Client . AccountInformation ( ab . AccountCrypt . Address . String ( ) , context . Background ( ) ) if err != nil { return err } if client . ValidAccount ( info ) { return nil } if len ( info . CreatedApps ) > 0 { return errors . New ( " " ) } appId , err := ab . Client . CreateApplication ( ab . AccountCrypt , client . ApproveTeal , client . ClearTeal ) if err != nil { return err } ab . AppId = appId return nil }
manageCreation creates an Algorand application for the target account.
manageCreation creates an Algorand application for the target account .