Skip to content

Instantly share code, notes, and snippets.

@basilche
Last active July 10, 2019 10:26
Show Gist options
  • Save basilche/5adf47759b4384cd6e08c9ae230a4f1e to your computer and use it in GitHub Desktop.
Save basilche/5adf47759b4384cd6e08c9ae230a4f1e to your computer and use it in GitHub Desktop.
## Installation
npm install --global zos
npm install --global ganache-cli
## Create new project
mkdir {project} && cd {project}
npm init
zos init {project}
npm install zos-lib
## Deploy contract locally
ganache-cli --port 9545 --deterministic
zos session --network local --from {sender} --expires 3600
zos add {contract}
zos push --deploy-dependencies
zos create {contract} --init initialize --args {args}
# Play with the deployed contract from console
npx truffle console --network local
truffle(local)> contract = {contract}.at("{address}")
...
truffle(local)> .exit
# Update contract (once you’ll change something)
zos push
zos update {contract}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment