Skip to content

Detect invalid combination of call flags and execution input at compile time #1008

@cmichi

Description

@cmichi

Follow-up to #960.

We should throw a compilation error if for cross-contract calls call_flags.forward_input() == true || call_flags.clone_input() == true while at the same time an execution input is specified. In this case the call flags imply that the execution input will never be used.

Ideally this would not be an expect(…) at runtime, but rather an error at compile time. This can be achieved by encoding the call flags in the type system, like we do for all the other cross-contract settings in https://github.com/paritytech/ink/blob/master/crates/env/src/call/call_builder.rs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions