Merge pull request #26119 from rohitwaghchaure/develop-sub-contract-enhancemnet

feat: subcontract code refactor and enhancement