makeScriptAddress
    :: NetworkMagic
    -> Maybe StakeholderId
    -> Script
    -> Address
makeScriptAddress nm stakeholder scr = makeAddress spendingData attrs
  where
    spendingData = ScriptASD scr
    aaStakeDistribution = maybe BootstrapEraDistr SingleKeyDistr stakeholder
    attrs = AddrAttributes { aaPkDerivationPath = Nothing
                           , aaNetworkMagic = nm
                           , ..}

-- | A function for making an address from 'RedeemPublicKey'.
makeScriptAddress
    :: NetworkMagic
    -> Maybe StakeholderId
    -> Script
    -> Address
makeScriptAddress nm stakeholder scr = makeAddress spendingData attrs
  where
    spendingData = ScriptASD scr
    aaStakeDistribution = maybe BootstrapEraDistr SingleKeyDistr stakeholder
    attrs = AddrAttributes { aaPkDerivationPath = Nothing
                           , aaNetworkMagic = nm
                           , ..}

-- | A function for making an address from 'RedeemPublicKey'.
makeScriptAddress nm stakeholder scr = makeAddress spendingData attrs
  where
    spendingData = ScriptASD scr
    aaStakeDistribution = maybe BootstrapEraDistr SingleKeyDistr stakeholder
    attrs = AddrAttributes { aaPkDerivationPath = Nothing
                           , aaNetworkMagic = nm
                           , ..}

-- | A function for making an address from 'RedeemPublicKey'.