Lending Petri nets and contracts