Method and device for deploying contracts