Money carried by warships?

I assume warships had to carry money, to pay crew and port fees and for supplies and so on?

Anyone know if they did, with particular reference to the Royal Australian Navy in WWII?

If not, how did they deal with payments they needed to make away from home?

I’m assuming that in the uncertain situation of war, a lot of places might be reluctant to accept anything except cash, in case the country incurring the debt went under.

As far as i know the warships were widelly used in paid for lend-lise by the Gold.
Those transports went from Murmansk to the Britain and USA.One of them were sinked by the GErmans submarine.