Skip to content

Improve init function call-blocking error handling #436

@miloszm

Description

@miloszm

Summary

Currently, calling an init function via transaction throws error which has incorrect text.
It should say "init method call not allowed" rather than "Contract does not exist"

Possible solution design or implementation

The behaviour is caused by the following code:

            Error::ContractDoesNotExist(_) => Self::DoesNotExist,
            Error::InitalizationError(_) => Self::DoesNotExist,

Rather than DoesNotExist, some new constant should be used.

Additional context

The change requires double-checking to make sure that it does not influence state roots.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions