Is it possible to use zos to deploy ("push") a contract from an arbitrary location?

#1

When I use the cli and run zos push, my understanding is that zos.json is checked, and the corresponding contracts are deployed to the network specified with the zos session command. I’m not sure whether the contract(s) are deployed from the .sol source file in the contracts directory, or from the truffle artifacts…but I’d like to know if there’s a way to specify the location of the contract I want to use? If it’s helpful, I would most likely be scripting the process, so not using the cli at all but rather zos-lib.

0 Likes

#2

Hi @n44o, Hope you’re having a great day! :slight_smile: I’m tagging @spalladino to assist you on this.

0 Likes

#3

Hey @n44o! zos push will recompile the source files using truffle compile (unless --skip-compile is set), and deploy the resulting artifacts from build/contracts. The build/contracts dir can be changed in the truffle configuration file (setting contracts_build_directory), but there is no way to change it programatically.

0 Likes

#4

@spalladino Thank you, that’s what I needed to know.

1 Like