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.
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.