Skip to content

Contract self impl #5905

Open
Open
@IGI-111

Description

@IGI-111

Allow self impl for contracts as a shorthand for an anonymous ABI spec.
The point is to not have to write an ABI type for very small contracts.

This:

contract;
impl Contract {
    fn foo() -> u64 { 0 }
}

Should produce the same binary and ABI spec as:

contract;
abi MyAbi {
    fn foo() -> u64;
}
impl MyAbi for Contract {
    fn foo() -> u64 { 0 }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    ODHack12compiler: frontendEverything to do with type checking, control flow analysis, and everything between parsing and IRgencompiler: parserEverything to do with the parsergood first issueGood for newcomerslanguage featureCore language features visible to end usersteam:compilerCompiler Team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions