Full Idea
The rule 'do nothing that ought not to be done to you' prohibits actions on account of their harmful consequences: the concealed premise is that an action will always be requited.
Gist of Idea
The Golden Rule prohibits harmful actions, with the premise that actions will be requited
Source
Friedrich Nietzsche (The Will to Power (notebooks) [1888], §925)
Book Reference
Nietzsche,Friedrich: 'The Will to Power', ed/tr. Kaufmann,W /Hollingdate,R [Vintage 1968], p.488
A Reaction
Indeed it seems to be a slogan for contractarians, though I don't see why you shouldn't be influenced by the thought that there might be reciprocation, even if you don't expect it.