Skip to content

yarn deploy fails with gas-cap errors on manual post-deploy contract calls #1262

@Pabl0cks

Description

@Pabl0cks

When a Hardhat deploy script makes manual contract calls after deployment (e.g. transferOwnership, grantRole, initialize), the transaction can fail with a gas-limit error.

This happens because these calls inherit blockGasLimit from the Hardhat network config as their gas cap, which may exceed the practical per-tx limit accepted by the running yarn chain node or a forked environment.

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