Skip to content

[Bug]: acton wrapper --all uses filename as the generated name for the main struct #1100

@racinette

Description

@racinette

Acton Version

acton 1.1.0 (9cf4d1f 2026-05-22)

Command

acton wrapper --all

What Happened

Contract.gen.tolk doesn't compile due to repeated struct names when using the same filename for contract definitions

Steps To Reproduce

  1. This kind of project layout:
[contracts.contract1]
display-name = "contract1"
src = "contracts/src/Contract1/contract.tolk"
depends = []

[contracts.contract2]
display-name = "Contract2"
src = "contracts/src/Contract2/contract.tolk"
depends = ["Contract1"]
  1. Run acton wrapper --all.

Current solution

src = "contracts/src/Contract1/Contract1.tolk"

But this messes up the layout of the project.

Expected Behavior

display-name is used for the name.

Actual Output

The generated files both have structs that look like this:


struct Contract {
    address: address
    stateInit: ContractState? = null
}


This creates conflicts in the `Contract.gen.tolk`

Acton Logs

Doctor Report

Project Or Input Files

No response

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions