By the former of these two statutes, upon proof that any person has been enticing any artificer, or that any artificer has promised or contracted to go into foreign parts, for the purposes aforesaid, such artificer may be obliged to give security, at the discretion of the court, that he shall not go beyond the seas, and may be committed to prison until he give such security.