Although a law may allow an informer or person prosecuting to have part of a fine, the whole thereof shall go to the state for the support of the free schools, unless the name of such informer or prosecutor be indorsed on or written at the foot of the presentment at the time it is made, or of the indictment before it is presented to the grand jury, or of the writ issued in the action, or the warrant, or the notice of the motion, before the service of such writ, warrant or notice.