Generate contract doc