Copied the deployer.js implementation from store