Skip to content

Defender deployment fails if multiple build info files have the same contract #57

@ericglau

Description

@ericglau

Defender deployments occur by passing the build info file containing the contract to the Defender SDK.

This plugin attempts to find the build info file by looking for the contract's source code hash within the build info directory. However, if the source code hash appears in multiple build info files, multiple build info files could be found but the result is one string concatenated by "\n". This causes an error when this string is passed to the Defender SDK.

This may be occurring in the

function getBuildInfoFile(
function.

We should detect this condition and give an appropriate error -- for example, with instructions to clean the project first.

Originally reported in https://forum.openzeppelin.com/t/cannot-find-option-to-do-multiple-chain-deployment-with-foundry-using-defender-v2-deploy/40708/7

Metadata

Metadata

Assignees

No one assigned

    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