{"_id":"@anchor-protocol/terrain","_rev":"7-7bb4446cfdaf08da72cdf149332e9a53","name":"@anchor-protocol/terrain","dist-tags":{"beta":"0.5.0-beta6","latest":"0.5.0-beta7"},"versions":{"0.5.0-beta4":{"name":"@anchor-protocol/terrain","version":"0.5.0-beta4","keywords":["oclif"],"author":{"name":"Supanat Potiwarakorn @iboss-ptk"},"license":"MIT","_id":"@anchor-protocol/terrain@0.5.0-beta4","maintainers":[{"name":"radzionchachura","email":"radzion@terra.money"},{"name":"amitpr","email":"17amitprasad@gmail.com"},{"name":"mandrean","email":"mandrean@pm.me"},{"name":"simke9445","email":"simke9445@gmail.com"},{"name":"cosullivan","email":"cain.osullivan@gmail.com"},{"name":"hanjukim","email":"hanjukim@gmail.com"},{"name":"kjessec","email":"jesse@soob.co"}],"homepage":"https://github.com/terra-money/terrain","bugs":{"url":"https://github.com/terra-money/terrain/issues"},"bin":{"terrain":"bin/run"},"dist":{"shasum":"de55016bb179cf31267bf08e1de409ba053b652c","tarball":"https://registry.npmjs.org/@anchor-protocol/terrain/-/terrain-0.5.0-beta4.tgz","fileCount":61,"integrity":"sha512-SOZDPEG31kWlscjI+x2jM6HTvLlEd69d7BDqVz/i2Fyo/XiCJCVIbbsm5aZiFgfqYbpmrbtBkXd2LmGC4/sHtg==","signatures":[{"sig":"MEYCIQCYjuM7689wbMYWXa+y0YKNmVWxcHBByvWsjo2bCxj7CQIhAI38+fMS4BKwcKL3/HoQA90RjDC0l8s1QZm1+j+7YMq5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":149032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipaA9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXyA/+L/44X+2bUupQHQFpvOgxTUNyhG2ar/uKxTtIMwcnfs8U3rxY\r\nokd1FrrvcBvhHbD/78JQQIpiwGKxzV6WJjsCDfwogYBOBCjEsCRe9mI+aMwY\r\nxRY+RCFt4unguqGElyTxtPhtXdUwaS4CzEfZzocvTKxevkQhBy487TtMo3TH\r\n6E/qJFxCwukQvcRRra/ez2PD49ll70+8pi/Q7tStUwD6d1Uka0kPozvJR7kQ\r\nigRKtv2ckAyLKBv3UCbvipAdp7bXmdu4kepzx7yqMRx/iXADcU4rwfUukX6B\r\n+BI3Cwl8teMZPtLZAxnVmLy+HeTzaakXnxlPLg8KRagwvC0m0moieAEQw8Qj\r\n4zu1fO+L0G3C1yqPROGDSrg44Sc1PUFr8zs9j93UxzKv1CSub4kAXSIUh9Dg\r\ny92wUq6s9ofKvTpohU7c1yE6ber/ZtIJmu23tcqJ18GjlPFe6UufXCsigmOG\r\niMcdn9ksa8wpDdDUF+M4MmiD7tfAyTOEsJwRS+7JiM06bG5vn1FZqfMo2zZB\r\nHck/dKiL/VE9b4ezZPdzHSWx2pC0LejaeIRlXdicFaY5JT3dd7Kyxby9W7QE\r\nI9tJhyXfKDTvmdmndTpNHnw0iduB9+YJszw+UR21JydnC8sUCo3MKnXnEDis\r\na3bqWiRoEhSojZe5uthA18l75Qjp3580lrQ=\r\n=Hv8P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","oclif":{"bin":"terrain","plugins":["@oclif/plugin-help","@oclif/plugin-not-found"],"commands":"./lib/commands","helpClass":"./lib/lib/help"},"types":"lib/index.d.ts","engines":{"node":">=12.0.0"},"gitHead":"26b88d5ee6b0dd65e84826d4e4654ef9833b1325","scripts":{"use":"node ./bin/run","lint":"eslint . --ext .ts --config .eslintrc.js","test":"jest","fixlint":"eslint . --ext .ts --config .eslintrc.js --fix","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","version":"oclif-dev readme && git add README.md","postpack":"rm -f oclif.manifest.json","posttest":"eslint . --ext .ts --config .eslintrc","test:watch":"jest --watch","prepack:use":"npm run prepack && npm run use"},"_npmUser":{"name":"cosullivan","email":"cain.osullivan@gmail.com"},"repository":{"url":"git+https://github.com/terra-money/terrain.git","type":"git"},"_npmVersion":"8.5.1","description":"Terra development environment","directories":{},"_nodeVersion":"16.14.0","dependencies":{"toml":"^3.0.0","yaml":"^1.10.2","chalk":"^4.0.0","ramda":"^0.26.1","tslib":"^1.14.1","cli-ux":"^5.6.3","adm-zip":"^0.5.9","ts-node":"^8.10.2","fs-extra":"^8.1.0","superagent":"^6.1.0","@oclif/core":"^1.0.11","@oclif/config":"^1.17.0","@oclif/command":"^1.8.0","@oclif/plugin-help":"^5.1.12","@terra-money/terra.js":"^3.1.0","@oclif/plugin-not-found":"^2.3.1","@terra-money/template-scaffolding":"1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","eslint":"^8.12.0","prettier":"2.4.1","babel-jest":"^27.3.1","typescript":"^3.9.10","@babel/core":"^7.16.0","@types/jest":"^27.0.2","@types/node":"^10.17.60","@types/ramda":"^0.26.0","@oclif/dev-cli":"^1.26.10","@types/adm-zip":"^0.4.34","@types/fs-extra":"^9.0.13","@babel/preset-env":"^7.16.0","@types/superagent":"^4.1.13","eslint-plugin-import":"^2.25.4","@babel/preset-typescript":"^7.16.0","@typescript-eslint/parser":"^5.18.0","eslint-config-airbnb-base":"^15.0.0","@typescript-eslint/eslint-plugin":"^5.18.0"},"_npmOperationalInternal":{"tmp":"tmp/terrain_0.5.0-beta4_1655021629672_0.597315298664371","host":"s3://npm-registry-packages"}},"0.5.0-beta5":{"name":"@anchor-protocol/terrain","version":"0.5.0-beta5","keywords":["oclif"],"author":{"name":"Supanat Potiwarakorn @iboss-ptk"},"license":"MIT","_id":"@anchor-protocol/terrain@0.5.0-beta5","maintainers":[{"name":"radzionchachura","email":"radzion@terra.money"},{"name":"amitpr","email":"17amitprasad@gmail.com"},{"name":"mandrean","email":"mandrean@pm.me"},{"name":"simke9445","email":"simke9445@gmail.com"},{"name":"cosullivan","email":"cain.osullivan@gmail.com"},{"name":"hanjukim","email":"hanjukim@gmail.com"},{"name":"kjessec","email":"jesse@soob.co"}],"homepage":"https://github.com/terra-money/terrain","bugs":{"url":"https://github.com/terra-money/terrain/issues"},"bin":{"terrain":"bin/run"},"dist":{"shasum":"b132ed074b0c8359d387786d0124c1ba7fec1c4f","tarball":"https://registry.npmjs.org/@anchor-protocol/terrain/-/terrain-0.5.0-beta5.tgz","fileCount":61,"integrity":"sha512-KusXADaxF+AhCHljS4Yr4Z/N+fkBh5fySnYr67jH9zdkD2OmyShAO/R1nciPa0GXxuiExaKGVC1M41hMZWpFMA==","signatures":[{"sig":"MEUCIQCmPPMcnYD3POHz+0o+DKLJ3aMh/OfJNGnW16glRzeduAIgdzZYBlntP7Zx0X+1NHjqB1SQ3nuL58dRp9MrWDZrDvA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":149032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipaKgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwqQ/9GbyR4uKsXqMHKxI0QrZuHwp372L87NhFDMx4bTOurxUKVZ9F\r\n40XnEVWAczDdUJg2bEjvqRNguCAuOmN9QWKSDdEOe93PpIFNy8txyQWvTuM0\r\nbzGdFzNxQRucb1lKXffrpoBKsmORw8gbCl7fnHC7Ej25kWS20YKWSdoOCGld\r\nbuDFlYTPhFZgr3H35RGZLLnY1a+bEMu6y4fQmwHLrO+ypXI5E0j3juVYkUlk\r\nWad8Ys1FPM8d38xyT4WQi4hq1bFOGX8+QTtDjg0TUpeQEAjapXBP0Soirkkg\r\n/TZ25gejNDecquHfuM6A+Vrk9ZsfU98wVs3hSXtmvbwRFdkkQBCONyrjcpsQ\r\n5IQKLH5hz6Kl/kWnyWCF7owyJ0UOv03hP+tnyqqF2tjTbjF9zVQ179uavdJL\r\n+bsC1BiYaWei+sOmKtKy39KyKha8JnLuSjQijHY7HpbglhR5WnD4KNxHNDw9\r\nAhyuqcoTti2M0PQcdZAS/YQ4TR6dfWdSSpOPuIDR50V1VR/z1dYnfncYBqox\r\nNNJr0wv5qlE1CJbmIaIr3oKYM70z0uwz96snkf6yx6suJ5sH6QPg/w/Cg3Wn\r\nZVrhJmbUhmoe7v9ge05RwCdzAhvs167qkNe4iwAoPTMSBb2udGdlAoSogIEq\r\nOn2MwV/f60SG8wDcLnsTM6eOKI+Lr0WP1bI=\r\n=s9WR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","oclif":{"bin":"terrain","plugins":["@oclif/plugin-help","@oclif/plugin-not-found"],"commands":"./lib/commands","helpClass":"./lib/lib/help"},"types":"lib/index.d.ts","engines":{"node":">=12.0.0"},"gitHead":"26b88d5ee6b0dd65e84826d4e4654ef9833b1325","scripts":{"use":"node ./bin/run","lint":"eslint . --ext .ts --config .eslintrc.js","test":"jest","fixlint":"eslint . --ext .ts --config .eslintrc.js --fix","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","version":"oclif-dev readme && git add README.md","postpack":"rm -f oclif.manifest.json","posttest":"eslint . --ext .ts --config .eslintrc","test:watch":"jest --watch","prepack:use":"npm run prepack && npm run use"},"_npmUser":{"name":"cosullivan","email":"cain.osullivan@gmail.com"},"repository":{"url":"git+https://github.com/terra-money/terrain.git","type":"git"},"_npmVersion":"8.5.1","description":"Terra development environment","directories":{},"_nodeVersion":"16.14.0","dependencies":{"toml":"^3.0.0","yaml":"^1.10.2","chalk":"^4.0.0","ramda":"^0.26.1","tslib":"^1.14.1","cli-ux":"^5.6.3","adm-zip":"^0.5.9","ts-node":"^8.10.2","fs-extra":"^8.1.0","superagent":"^6.1.0","@oclif/core":"^1.0.11","@oclif/config":"^1.17.0","@oclif/command":"^1.8.0","@oclif/plugin-help":"^5.1.12","@terra-money/terra.js":"^3.1.0","@oclif/plugin-not-found":"^2.3.1","@terra-money/template-scaffolding":"1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","eslint":"^8.12.0","prettier":"2.4.1","babel-jest":"^27.3.1","typescript":"^3.9.10","@babel/core":"^7.16.0","@types/jest":"^27.0.2","@types/node":"^10.17.60","@types/ramda":"^0.26.0","@oclif/dev-cli":"^1.26.10","@types/adm-zip":"^0.4.34","@types/fs-extra":"^9.0.13","@babel/preset-env":"^7.16.0","@types/superagent":"^4.1.13","eslint-plugin-import":"^2.25.4","@babel/preset-typescript":"^7.16.0","@typescript-eslint/parser":"^5.18.0","eslint-config-airbnb-base":"^15.0.0","@typescript-eslint/eslint-plugin":"^5.18.0"},"_npmOperationalInternal":{"tmp":"tmp/terrain_0.5.0-beta5_1655022240497_0.9231420605052658","host":"s3://npm-registry-packages"}},"0.5.0-beta6":{"name":"@anchor-protocol/terrain","version":"0.5.0-beta6","keywords":["oclif"],"author":{"name":"Supanat Potiwarakorn @iboss-ptk"},"license":"MIT","_id":"@anchor-protocol/terrain@0.5.0-beta6","maintainers":[{"name":"radzionchachura","email":"radzion@terra.money"},{"name":"amitpr","email":"17amitprasad@gmail.com"},{"name":"mandrean","email":"mandrean@pm.me"},{"name":"simke9445","email":"simke9445@gmail.com"},{"name":"cosullivan","email":"cain.osullivan@gmail.com"},{"name":"hanjukim","email":"hanjukim@gmail.com"},{"name":"kjessec","email":"jesse@soob.co"}],"homepage":"https://github.com/terra-money/terrain","bugs":{"url":"https://github.com/terra-money/terrain/issues"},"bin":{"terrain":"bin/run"},"dist":{"shasum":"7b41a5076e01b54144d263ee824f652864ea0f92","tarball":"https://registry.npmjs.org/@anchor-protocol/terrain/-/terrain-0.5.0-beta6.tgz","fileCount":61,"integrity":"sha512-XaTh5uHQi51RiSifiwLEDXM+4KjWnhe6AAq1V3h0UMQ65L7+b1nQQy2QhQIHhEOj9AsZP2OIJZdgXpWaDdx8BA==","signatures":[{"sig":"MEYCIQCPmXEGKkNZzdzrfjCv6J0Re08sRY4bUacTFNhhM1CEfQIhAM1fFGvLICJWwQQ2giaKkJPqK6dFzfFAt0pY4Bw/X6vH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":149160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipp7pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZUg//cSBT0EWVsdgZWOXyAPAsWZ0QRYDSWZ5QeZew0/MvKklxJVMu\r\niUIF/0WWowDkQqSgdwTYtmmQdJCjhUcbwqqBwfy9Y7DpO5VJas7IDOB6WPHb\r\nkQ9OZ7zqAXDgqCJ3F2hrlVX6PuZnFy/r8dC+mX7dZNyEJ4B+UqmOzsFQy2KZ\r\n+2RwO8Hw7gsLsjjf6OyGkD84f6Y8jdbVapP/1Z+e/7SjLKhVyAdFpu1aaPCF\r\nUavbTGDZQzahqMh/iuPvweSmaql8tSR+AAGhKHlkiBVnFEurfOaUehFkBdkB\r\nTZJEX4zd7svv7uqOTehhE/LFzy+Rmzpg85snQXd4fG9Vwxn4B5JOdvs74+yw\r\nk6wKR+PNl20WdWmUJlxXoEeUSoNR6Yc7etaR5wNapuOb+lwZWb6q8sggZmkQ\r\nhH+Q0+wQm0LIUWte/+Pr75ybS+EfM2WU2ZAQLNEa2KdnS5urX5JzFaLccjFt\r\nxSTJQ1JsomFqZ2lazFFSo/7ajLGOex3gfMD7HDR6v1/IZId6c3aTNiQUBJvm\r\nuJEa/ZmGmV9GVBGJB1y7rMqwPKDh608kuVJXF+tgbc1JxvsU2j9814+2Fryo\r\nM+IP9ygZLzYiJYf0GhFsSsxCFy2dmtmIhXzLPlUYR+ZwL7QWh2k9IGz+0low\r\nSYA8EPk6sYMj7h4OZrwC2T72J3PZqEvTzb4=\r\n=UyRj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","oclif":{"bin":"terrain","plugins":["@oclif/plugin-help","@oclif/plugin-not-found"],"commands":"./lib/commands","helpClass":"./lib/lib/help"},"types":"lib/index.d.ts","readme":"# Terrain\r\n\r\n<p align=\"center\" >\r\n<a alt=\"terrain logo is generative, click to see the code!\" href=\"https://editor.p5js.org/iboss-ptk/sketches/-mAM5HzH_\">\r\n<img src=\"./logo.png\" alt=\"terrain logo\" width=\"200\"/>\r\n</a>\r\n</p>\r\n\r\n<p align=\"center\" >\r\n<b>Terrain</b> – A Terra development environment for seamless smart contract development.\r\n</p>\r\n\r\n---\r\n\r\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) [![Version](https://img.shields.io/npm/v/terrain.svg)](https://npmjs.org/package/terrain) [![Downloads/week](https://img.shields.io/npm/dw/terrain.svg)](https://npmjs.org/package/terrain)\r\n\r\nTerrain allows you to:\r\n\r\n- Scaffold a template smart contract and frontend for app development.\r\n- Dramatically simplify the development and deployment process.\r\n\r\nTerrain is **not**:\r\n\r\n- A fully-featured Terra command-line interface (CLI). If you need a fully-featured client, use <a href=\"https://docs.terra.money/docs/develop/how-to/terrad/using-terrad.html\" target=\"_blank\">terrad</a>.\r\n- A Light Client Daemon (LCD). You will still need an RPC endpoint to deploy your contract. <a href=\"https://github.com/terra-money/LocalTerra#readme\" target=\"_blank\">LocalTerra</a> is the recommended option for this.\r\n\r\n---\r\n\r\n# Table of contents\r\n\r\n<!-- toc -->\n* [Terrain](#terrain)\n* [Table of contents](#table-of-contents)\n* [Setup](#setup)\n* [Getting Started](#getting-started)\n* [Migrating CosmWasm Contracts on Terra](#migrating-cosmwasm-contracts-on-terra)\n* [Use Terrain Main Branch Locally](#use-terrain-main-branch-locally)\n* [Terrain Commands](#terrain-commands)\n<!-- tocstop -->\r\n* [Terrain](#terrain)\r\n* [Table of contents](#table-of-contents)\r\n* [Setup](#setup)\r\n* [Getting Started](#getting-started)\r\n* [Migrating CosmWasm Contracts on Terra](#migrating-cosmwasm-contracts-on-terra)\r\n* [Use Terrain Main Branch Locally](#use-terrain-main-branch-locally)\r\n* [Terrain Commands](#terrain-commands)\r\n<!-- tocstop -->\r\n* [Terrain](#terrain)\r\n* [Table of contents](#table-of-contents)\r\n* [Setup](#setup)\r\n* [Getting Started](#getting-started)\r\n* [Migrating CosmWasm Contracts on Terra](#migrating-cosmwasm-contracts-on-terra)\r\n* [Use Terrain Main Branch Locally](#use-terrain-main-branch-locally)\r\n* [Terrain Commands](#terrain-commands)\r\n<!-- tocstop -->\r\n\r\n# Setup\r\n\r\n## Download LocalTerra\r\n\r\nFor testing purposes, we recommend to install and run LocalTerra on your personal computer. Instructions on how to get LocalTerra up and running can be found in the <a href=\"https://github.com/terra-money/LocalTerra#readme\" target=\"_blank\">\r\nLocalTerra documentation</a>.\r\n\r\n<sub>**Note:** _If you are using a Mac with an M1 chip, you might need to update your Docker Desktop due to the <a href=\"https://github.com/docker/for-mac/issues/5561\" target=\"_blank\">qemu bug</a>._</sub>\r\n\r\nOnce all dependencies have been installed, do the following:\r\n\r\n1. Clone the LocalTerra repo.\r\n\r\n```\r\ngit clone https://github.com/terra-money/LocalTerra.git\r\n```\r\n\r\n2. Navigate to the newly created `LocalTerra` directory.\r\n\r\n```\r\ncd LocalTerra\r\n```\r\n\r\n3. Spin up an instance of the environment with `docker-compose`.\r\n\r\n```\r\ndocker-compose up\r\n```\r\n\r\n## Setup Rust\r\n\r\nWhile WASM smart contracts can be written in any programming language, **it is strongly recommended that you utilize Rust**, as it is the only language for which mature libraries and tooling exist for CosmWasm. To complete this tutorial, install the latest version of Rust by following the instructions <a href=\"https://www.rust-lang.org/tools/install\" target=\"_blank\">here</a>. Once Rust is installed on your computer, do the following:\r\n\r\n1. Set the default release channel used to update Rust to stable:\r\n\r\n```sh\r\nrustup default stable\r\n```\r\n\r\n2. Add wasm as the compilation target:\r\n\r\n```sh\r\nrustup target add wasm32-unknown-unknown\r\n```\r\n\r\n3. Install the necessary dependencies for generating contracts:\r\n\r\n```sh\r\ncargo install cargo-run-script\r\n```\r\n\r\n## Install Node JS and NPM\r\n\r\nTo run Terrain, you will need to install Node.js and NPM. We recommend that you install <a href=\"https://nodejs.org/en/download/\" target=\"_blank\">Node.js v16 (LTS)</a>. Node Package Manager (NPM) is automatically installed along with your Node.js download.\r\n\r\n<sub>**Note:** _Use Node.js v16 (LTS) if you encounter the following error code: `error:0308010C:digital envelope routines::unsupported`_</sub>\r\n\r\n# Getting Started\r\n\r\nNow that you have completed the initial setup, generate your first smart contract using the procedure described below:\r\n\r\n1. Install the terrain package globally.\r\n\r\n```sh\r\nnpm install -g @terra-money/terrain\r\n```\r\n\r\n<sub>**Note:** _If you would like to install terrain locally, you can execute the command `npm install @terra-money/terrain`, without the `-g` flag, while in the directory in which you would like to be able to use the package. You can then execute any terrain commands by prefixing them with `npx`. For example, to scaffold a new project named `my-terra-dapp` with a locally installed terrain package, you would utilize the command `npx terrain new my-terra-dapp`._</sub>\r\n\r\n2. Generate your smart contract and corresponding frontend templates.\r\n\r\n```sh\r\nterrain new my-terra-dapp\r\n```\r\n\r\n3. Navigate to the new `my-terra-dapp` directory.\r\n\r\n```sh\r\ncd my-terra-dapp\r\n```\r\n\r\n4. Install all necessary Node dependencies in your project.\r\n\r\n```sh\r\nnpm install\r\n```\r\n\r\n## Project Structure\r\n\r\nThe `terrain new` command generates a project with the following structure:\r\n\r\n```\r\n.\r\n├── contracts              # the smart contract directory\r\n│   ├── counter            # template smart contract\r\n│   └── ...\r\n├── frontend               # template frontend application\r\n├── lib                    # predefined task and console functions\r\n├── tasks                  # predefined tasks\r\n├── keys.terrain.js        # keys for signing transactions\r\n├── config.terrain.json    # config for connections and contract deployments\r\n└── refs.terrain.json      # deployed code and contract references\r\n```\r\n\r\n## Deployment\r\n\r\nThe `terrain deploy` command does the following:\r\n\r\n- Builds, optimizes and stores the wasm code on the blockchain.\r\n- Instantiates the contract.\r\n\r\nTo deploy your new counter smart contract, run the following command in the terminal.\r\n\r\n```sh\r\nterrain deploy counter --signer test1\r\n```\r\n\r\n<sub> **Note:** _You can also store the wasm code and instantiate the contract separately using the command [`terrain code:store CONTRACT`](#terrain-codestore-contract) followed by [`terrain contract:instantiate CONTRACT`](#terrain-contractmigrate-contract). In this case, you must also run the command `terrain sync-refs` in your project directory to update the `refs.terrain.json` file which references contract deployments on all networks._</sub>\r\n\r\nIn this case, we specify one of the <a href=\"https://github.com/terra-money/LocalTerra#accounts\" target=\"_blank\">preconfigured accounts</a> with balances on LocalTerra, `test1`, as our signer. The signer account will be responsible for paying the gas fee associated with deploying the contract to the Terra blockchain and will be assigned as the owner of the project.\r\n\r\nYou can also specify the network on which you would like to deploy your contract by adding the `--network` flag. If the network is not specified, as is the case in our above example, your contract will be deployed to `localterra` by default. You may also deploy to `mainnet`, the live Terra blockchain, as well as `testnet`, a network similar to mainnet used for testing.\r\n\r\n<br/>\r\n\r\n### Deploying on Testnet or Mainnet\r\n\r\nThe predefined accounts in the `keys.terrain.js` file shown below can be utilized as signers on `testnet`. We will demonstrate how to deploy your smart contract utilizing the preconfigured `custom_tester_1` account. You may also add a personal account to the `keys.terrain.js` file by adding the account name as well as its corresponding private key. You can then use that account as the signer specifying the account name after the `--signer` flag in the `terrain deploy` command.\r\n\r\n<sub>**Warning:** _Utilizing a personal account for deployment requires the use of a private key or mnemonic. These are private keys that are generated upon creation of your personal wallet. Saving or utilizing these keys on your personal computer may expose them to malicious actors who could gain access to your personal wallet if they are able to obtain them. You can create a wallet solely for testing purposes to eliminate risk. Alternatively, you can store your private keys as secret enviroment variables which you can then reference utilizing `process.env.SECRET_VAR` in `keys.terrain.json`. Use your private key or mnemonic at your own discretion._</sub>\r\n\r\n```js\r\n// can use `process.env.SECRET_MNEMONIC` or `process.env.SECRET_PRIV_KEY`\r\n// to populate secret in CI environment instead of hardcoding\r\n\r\nmodule.exports = {\r\n  custom_tester_1: {\r\n    mnemonic:\r\n      \"shiver position copy catalog upset verify cheap library enjoy extend second peasant basic kit polar business document shrug pass chuckle lottery blind ecology stand\",\r\n  },\r\n  custom_tester_2: {\r\n    privateKey: \"fGl1yNoUnnNUqTUXXhxH9vJU0htlz9lWwBt3fQw+ixw=\",\r\n  },\r\n};\r\n```\r\n\r\nPrior to deploying your contract, ensure that your signer wallet contains the funds needed to pay for associated transaction fees. You can request funds from the <a href=\"https://faucet.terra.money/\" target=\"_blank\">Terra Testnet Faucet</a> by submitting the wallet address of the account where you would like to receive the funds and clicking on the `Send me tokens` button.\r\n\r\nYou can retrieve the wallet address associated with the `custom_tester_1` account by utilizing the `terrain console` in your terminal.\r\n\r\n```sh\r\nterrain console\r\n\r\nterrain > wallets.custom_tester_1.key.accAddress\r\n'terra1qd9fwwgnwmwlu2csv49fgtum3rgms64s8tcavp'\r\n```\r\n\r\nAfter you have received the Luna tokens from the Terra Testnet Faucet, query the balance of your account by utilizing the following command in the terrain console.\r\n\r\n```sh\r\nterrain > (await client.bank.balance(wallets.custom_tester_1.key.accAddress))[0]\r\n```\r\n\r\nFinally, exit the terrain console and deploy the `counter` smart contract to testnet with the `custom_tester_1` account as the signer.\r\n\r\n```sh\r\nterrain deploy counter --signer custom_tester_1 --network testnet\r\n```\r\n\r\n## Initializing the Frontend Template\r\n\r\nAfter deployment, the `refs.terrain.json` file is updated in the project directory as well as the `frontend/src` directory. These files contain all contract references on all networks. This information is utilized by terrain's utility functions and also the frontend template. An example of `refs.terrain.json` can be found below:\r\n\r\n```json\r\n{\r\n  \"localterra\": {\r\n    \"counter\": {\r\n      \"codeId\": \"1\",\r\n      \"contractAddresses\": {\r\n        \"default\": \"terra18vd8fpwxzck93qlwghaj6arh4p7c5n896xzem5\"\r\n      }\r\n    }\r\n  },\r\n  \"testnet\": {\r\n    \"counter\": {\r\n      \"codeId\": \"18160\",\r\n      \"contractAddresses\": {\r\n        \"default\": \"terra15faphq99pap3fr0dwk46826uqr2usve739l7ms\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n<sub> **Important:** _If you have initialized the contract without using the `terrain deploy` command or have manually changed the `refs.terrain.json` file in the project directory, you will need to sync the references to the `frontend/src` directory in order to ensure frontend functionality. To do so, use the following command: `terrain sync-refs`_</sub>\r\n\r\nAfter you have synced the contract references, navigate to the `frontend` directory and start the application.\r\n\r\n1. Navigate to the `frontend` directory.\r\n\r\n```sh\r\ncd frontend\r\n```\r\n\r\n2. Start the application.\r\n\r\n```sh\r\nnpm run start\r\n```\r\n\r\n<sub> **Note:** _Switching networks in your Terra Station extension will result in a change in reference to the contract address which corresponds with the new network._</sub>\r\n\r\n## Run Contract Functions with Terrain\r\n\r\nOnce you have successfully deployed your project, you can interact with the deployed contract and the underlying blockchain by utilizing functions defined in the `lib/index.js` file. You may also create your own abstractions in this file for querying or executing transactions. The default contents of the `lib/index.js` file are presented below:\r\n\r\n```js\r\n// lib/index.js\r\n\r\nmodule.exports = ({ wallets, refs, config, client }) => ({\r\n  getCount: () => client.query(\"counter\", { get_count: {} }),\r\n  increment: (signer = wallets.test1) =>\r\n    client.execute(signer, \"counter\", { increment: {} }),\r\n});\r\n```\r\n\r\nYou can call the functions defined above inside of the `terrain console`. An example of this using the `counter` contract is shown below.\r\n\r\n```sh\r\nterrain console\r\nterrain > await lib.getCount()\r\n{ count: 0 }\r\nterrain > await lib.increment()\r\nterrain > await lib.getCount()\r\n{ count: 1 }\r\n```\r\n\r\nYou can also specify which network you would like to interact with by utilizing the `--network` flag.\r\n\r\n```\r\nterrain console --network NETWORK\r\n```\r\n\r\n## Creating Tasks\r\n\r\nYou can also utilize the functions available inside of the `lib/index.js` file to create tasks. Tasks are utilized in order to automate the execution of sequential functions or commands. An example task is provided for you in the `tasks/example-with-lib.js` file in your project directory.\r\n\r\n```js\r\n// tasks/example-with-lib.js\r\n\r\nconst { task } = require(\"@terra-money/terrain\");\r\nconst lib = require(\"../lib\");\r\n\r\ntask(async (env) => {\r\n  const { getCount, increment } = lib(env);\r\n  console.log(\"count 1 = \", await getCount());\r\n  await increment();\r\n  console.log(\"count 2 = \", await getCount());\r\n});\r\n```\r\n\r\nTo run the example task shown above, which is located in the `tasks/example-with-lib.js` file, run the following command in the terminal.\r\n\r\n```sh\r\nterrain task:run example-with-lib\r\n```\r\n\r\nIn order to create a new task, run the following command, replacing `<task-name>` with the desired name for your new task.\r\n\r\n```sh\r\nterrain task:new <task-name>\r\n```\r\n\r\nIf you would like to utilize JavaScript in your functions or tasks, you can import Terra.js. The `tasks/example-custom-logic.js` file contains an example of a task that utilizes Terra.js functionality. To learn more about Terra.js, view the <a href=\"https://terra-money.github.io/terra.js/\" target=\"_blank\">Terra.js documentation</a>.\r\n\r\n```js\r\n// tasks/example-custom-logic.js\r\n\r\nconst { task, terrajs } = require(\"@terra-money/terrain\");\r\n\r\n// terrajs is basically re-exported terra.js (https://terra-money.github.io/terra.js/)\r\n\r\ntask(async ({ wallets, refs, config, client }) => {\r\n  console.log(\"creating new key\");\r\n  const key = terrajs.MnemonicKey();\r\n  console.log(\"private key\", key.privateKey.toString(\"base64\"));\r\n  console.log(\"mnemonic\", key.mnemonic);\r\n});\r\n```\r\n\r\nAs of Terrain 0.4.0 it is possible to deploy and instantiate contracts from tasks. This can be useful for multi-contract, or multi-stage deployments. \r\n\r\n```js\r\nconst { task } = require(\"@terra-money/terrain\");\r\n\r\ntask(async ({ wallets, client, deploy }) => {\r\n  // First deploy the counter smart contract.\r\n  const counterCodeId = await deploy.storeCode(wallets.test1, \"counter\");\r\n  const counterAddress = await deploy.instantiate(\r\n    // Signer\r\n    wallets.test1,\r\n    // Contract name\r\n    \"counter\",\r\n    // Code ID\r\n    counterCodeId,\r\n    // Instance ID\r\n    \"default\",\r\n    // Contract admin\r\n    wallets.test1.key.accAddress\r\n  );\r\n\r\n  // Now deploy a CW20 with the counter contract set as the minter in instantiation.\r\n  const cw20CodeId = await deploy.storeCode(wallets.test1, \"cw20-base\");\r\n  const cw20Address = await deploy.instantiate(\r\n    wallets.test1,\r\n    \"cw20-base\",\r\n    cw20CodeId,\r\n    \"default\",\r\n    wallets.test1.key.accAddress,\r\n    // Custom instantiation message.\r\n    // with no message provided the default from config.terrain will be used.\r\n    {\r\n      name: \"counter\",\r\n      symbol: \"CTR\",\r\n      decimals: 6,\r\n      initial_balances: [],\r\n      mint: {\r\n        minter: counterAddress,\r\n      },\r\n    }\r\n  );\r\n\r\n  // Update the CW20 address in counter.\r\n  // Note: It's important to use the address returned by deploy.instantiate\r\n  // Refs are only read into memory at the start of the task.\r\n  await client.execute(wallets.test1, counterAddress, {\r\n    update_token: { token: cw20Address },\r\n  });\r\n\r\n  console.log(`CW20 Address: ${cw20Address}`);\r\n});\r\n```\r\n---\r\n\r\n# Migrating CosmWasm Contracts on Terra\r\n\r\nOn Terra it is possible to initalize contracts as migratable. This functionallity allows the adminstrator to upload a new version of the contract, then send a migrate message to move to the new code.\r\n\r\n<a href=\"https://docs.terra.money/docs/develop/dapp/quick-start/contract-migration.html\" target=\"_blank\">This tutorial</a> builds on top of the Terrain Quick Start Guide and walks you through a contract migration.\r\n\r\n## Adding MigrateMsg to the Contract\r\n\r\nIn order for a contract to be migratable, it must satisfy the following two requirements:\r\n\r\n1. The smart contract handles the `MigrateMsg` transaction.\r\n2. The smart contract has an admininstrator set.\r\n\r\nTo implement support for `MigrateMsg`, add the message to the `msg.rs` file. To do so, navigate to `msg.rs` and place the following code just above the `InstantiateMsg` struct.\r\n\r\n```rust\r\n#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]\r\npub struct MigrateMsg {}\r\n```\r\n\r\nWith `MigrateMsg` defined, update the `contract.rs` file. First, update the import from `crate::msg` to include `MigrateMsg`.\r\n\r\n```rust\r\nuse crate::msg::{CountResponse, ExecuteMsg, InstantiateMsg, QueryMsg, MigrateMsg};\r\n```\r\n\r\nNext, add the following method above `instantiate`.\r\n\r\n```rust\r\n#[cfg_attr(not(feature = \"library\"), entry_point)]\r\npub fn migrate(_deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Response> {\r\n    Ok(Response::default())\r\n}\r\n```\r\n\r\n## Migrating the Contract\r\n\r\nIn the previous Terrain tutorial, we deployed the contract, but did not initilize it as migratable.\r\n\r\nAfter adding MigrateMsg to the smart contract, we can redeploy the contract and add the `--set-signer-as-admin` flag. This allows the transaction signer to migrate the contract in the future.\r\n\r\n```sh\r\nterrain deploy counter --signer test1 --set-signer-as-admin\r\n```\r\n\r\nIf you decide to make changes to the deployed contract, you can migrate to the updated code by executing the following command.\r\n\r\n```sh\r\nterrain contract:migrate counter --signer test1\r\n```\r\n\r\n# Use Terrain Main Branch Locally\r\n\r\nIn some cases, the latest features or bug fixes may be integrated into the main branch of the <a href=\"https://github.com/terra-money/terrain\" target=\"_blank\">Terrain Github repo</a>, but not yet released to the corresponding <a href=\"https://www.npmjs.com/package/@terra-money/terrain\" target=\"_blank\">npm package</a>. Subsequently, you may want to use the latest version of Terrain available on Github before it has been released to npm. The below described method may also be utilized if you are interested in developing on and contributing to Terrain.\r\n\r\n<sub>**Warning:** _Features and bug fixes that are implemented on the latest version of Terrain may still be subject to testing. As such, you should only use the main branch of the Terrain github repo in exceptional circumstances. In all other cases, use the npm package._</sub>\r\n\r\nTo use the main branch of the Terrain repo on your local machine, do the following:\r\n\r\n1. Clone the repo.\r\n\r\n```\r\ngit clone --branch main --depth 1 https://github.com/terra-money/terrain\r\n```\r\n\r\n2. Navigate to the project folder.\r\n\r\n```\r\ncd terrain\r\n```\r\n\r\n3. Inside the project folder, install all necessary node dependencies.\r\n\r\n```\r\nnpm install\r\n```\r\n\r\n4.  Run the `npm link` command to link the project to your global terrain instance.\r\n\r\n```\r\nnpm link\r\n```\r\n\r\nTo unlink the terrain command from the cloned repository and revert back to the default functionality you can run the command below.\r\n\r\n```\r\nnpm unlink terrain\r\n```\r\n\r\n---\r\n\r\n# Terrain Commands\r\n\r\n<!-- commands -->\n* [`terrain build [CONTRACT]`](#terrain-build-contract)\n* [`terrain console`](#terrain-console)\n* [`terrain contract:instantiate CONTRACT`](#terrain-contractinstantiate-contract)\n* [`terrain contract:migrate CONTRACT`](#terrain-contractmigrate-contract)\n* [`terrain contract:new NAME`](#terrain-contractnew-name)\n* [`terrain contract:store CONTRACT`](#terrain-contractstore-contract)\n* [`terrain contract:updateAdmin CONTRACT ADMIN`](#terrain-contractupdateadmin-contract-admin)\n* [`terrain deploy CONTRACT`](#terrain-deploy-contract)\n* [`terrain help [COMMAND]`](#terrain-help-command)\n* [`terrain new NAME`](#terrain-new-name)\n* [`terrain optimize [CONTRACT]`](#terrain-optimize-contract)\n* [`terrain sync-refs [FILE]`](#terrain-sync-refs-file)\n* [`terrain task:new [TASK]`](#terrain-tasknew-task)\n* [`terrain task:run [TASK]`](#terrain-taskrun-task)\n* [`terrain test CONTRACT-NAME`](#terrain-test-contract-name)\n* [`terrain test:coverage [CONTRACT-NAME]`](#terrain-testcoverage-contract-name)\n* [`terrain wallet:new`](#terrain-walletnew)\n\n## `terrain build [CONTRACT]`\n\nBuild and optimize wasm bytecode.\n\n```\nUSAGE\n  $ terrain build [CONTRACT] [--optimize] [--workspace <value>] [--arm64]\n\nFLAGS\n  --arm64              use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\n                       quicker on arm64 hardware during development.\n  --optimize           optimize the wasm after the build.\n  --workspace=<value>\n\nDESCRIPTION\n  Build and optimize wasm bytecode.\n```\n\n_See code: [src/commands/build.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/build.ts)_\n\n## `terrain console`\n\nStart a repl console that provides context and convinient utilities to interact with the blockchain and your contracts.\n\n```\nUSAGE\n  $ terrain console [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>]\n\nFLAGS\n  --config-path=<value>  [default: config.terrain.json]\n  --keys-path=<value>    [default: keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --refs-path=<value>    [default: refs.terrain.json]\n\nDESCRIPTION\n  Start a repl console that provides context and convinient utilities to interact with the blockchain and your\n  contracts.\n```\n\n_See code: [src/commands/console.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/console.ts)_\n\n## `terrain contract:instantiate CONTRACT`\n\nInstantiate the contract.\n\n```\nUSAGE\n  $ terrain contract:instantiate [CONTRACT] [--signer <value>] [--set-signer-as-admin] [--network <value>] [--config-path\n    <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>]\n\nFLAGS\n  --code-id=<value>      specfic codeId to instantiate\n  --config-path=<value>  [default: ./config.terrain.json]\n  --instance-id=<value>  [default: default]\n  --keys-path=<value>    [default: ./keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --refs-path=<value>    [default: ./refs.terrain.json]\n  --set-signer-as-admin  set signer (deployer) as admin to allow migration.\n  --signer=<value>       [default: test1]\n\nDESCRIPTION\n  Instantiate the contract.\n```\n\n_See code: [src/commands/contract/instantiate.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/contract/instantiate.ts)_\n\n## `terrain contract:migrate CONTRACT`\n\nMigrate the contract.\n\n```\nUSAGE\n  $ terrain contract:migrate [CONTRACT] [--signer <value>] [--arm64] [--build] [--network <value>] [--config-path\n    <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>] [--workspace\n    <value>]\n\nFLAGS\n  --arm64                use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\n                         quicker on arm64 hardware during development.\n  --build                rebuild the wasm before deploying.\n  --code-id=<value>      target code id for migration\n  --config-path=<value>  [default: ./config.terrain.json]\n  --instance-id=<value>  [default: default]\n  --keys-path=<value>    [default: ./keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --refs-path=<value>    [default: ./refs.terrain.json]\n  --signer=<value>       [default: test1]\n  --workspace=<value>\n\nDESCRIPTION\n  Migrate the contract.\n```\n\n_See code: [src/commands/contract/migrate.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/contract/migrate.ts)_\n\n## `terrain contract:new NAME`\n\nGenerate new contract.\n\n```\nUSAGE\n  $ terrain contract:new [NAME] [--path <value>] [--version <value>] [--authors <value>]\n\nFLAGS\n  --authors=<value>  [default: Terra Money <core@terra.money>]\n  --path=<value>     [default: ./contracts] path to keep the contracts\n  --version=<value>  [default: 1.0-beta6]\n\nDESCRIPTION\n  Generate new contract.\n\nEXAMPLES\n  $ terrain code:new awesome_contract\n\n  $ terrain code:new awesome_contract --path path/to/dapp\n\n  $ terrain code:new awesome_contract --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\n```\n\n_See code: [src/commands/contract/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/contract/new.ts)_\n\n## `terrain contract:store CONTRACT`\n\nStore code on chain.\n\n```\nUSAGE\n  $ terrain contract:store [CONTRACT] [--signer <value>] [--no-rebuild] [--network <value>] [--config-path <value>]\n    [--refs-path <value>] [--keys-path <value>] [--code-id <value>] [--workspace <value>]\n\nFLAGS\n  --code-id=<value>\n  --config-path=<value>  [default: ./config.terrain.json]\n  --keys-path=<value>    [default: ./keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --no-rebuild           deploy the wasm bytecode as is.\n  --refs-path=<value>    [default: ./refs.terrain.json]\n  --signer=<value>       [default: test1]\n  --workspace=<value>\n\nDESCRIPTION\n  Store code on chain.\n```\n\n_See code: [src/commands/contract/store.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/contract/store.ts)_\n\n## `terrain contract:updateAdmin CONTRACT ADMIN`\n\nUpdate the admin of a contract.\n\n```\nUSAGE\n  $ terrain contract:updateAdmin [CONTRACT] [ADMIN] [--signer <value>] [--network <value>] [--config-path <value>]\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>]\n\nFLAGS\n  --config-path=<value>  [default: ./config.terrain.json]\n  --instance-id=<value>  [default: default]\n  --keys-path=<value>    [default: ./keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --refs-path=<value>    [default: ./refs.terrain.json]\n  --signer=<value>       [default: test1]\n\nDESCRIPTION\n  Update the admin of a contract.\n```\n\n_See code: [src/commands/contract/updateAdmin.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/contract/updateAdmin.ts)_\n\n## `terrain deploy CONTRACT`\n\nBuild wasm bytecode, store code on chain and instantiate.\n\n```\nUSAGE\n  $ terrain deploy [CONTRACT] [--signer <value>] [--arm64] [--build] [--set-signer-as-admin] [--network\n    <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>]\n    [--admin-address <value>] [--frontend-refs-path <value>] [--sync] [--workspace <value>]\n\nFLAGS\n  --admin-address=<value>       set custom address as contract admin to allow migration.\n  --arm64                       use rust-optimizer-arm64 for optimization. Not recommended for production, but it will\n                                optimize quicker on arm64 hardware during development.\n  --build                       rebuild the wasm before deploying.\n  --config-path=<value>         [default: ./config.terrain.json]\n  --frontend-refs-path=<value>  [default: ./frontend/src/refs.terrain.json]\n  --instance-id=<value>         [default: default] enable management of multiple instances of the same contract\n  --keys-path=<value>           [default: ./keys.terrain.js]\n  --network=<value>             [default: localterra]\n  --refs-path=<value>           [default: ./refs.terrain.json]\n  --set-signer-as-admin         set signer (deployer) as admin to allow migration.\n  --signer=<value>              [default: test1]\n  --sync                        sync the contracts to the frontend.\n  --workspace=<value>\n\nDESCRIPTION\n  Build wasm bytecode, store code on chain and instantiate.\n```\n\n_See code: [src/commands/deploy.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/deploy.ts)_\n\n## `terrain help [COMMAND]`\n\ndisplay help for terrain\n\n```\nUSAGE\n  $ terrain help [COMMAND] [--all]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nFLAGS\n  --all  see all commands in CLI\n\nDESCRIPTION\n  display help for terrain\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_\n\n## `terrain new NAME`\n\nCreate new dapp from template.\n\n```\nUSAGE\n  $ terrain new [NAME] [--path <value>] [--framework react|vue|svelte|next|vite|lit|none] [--version\n    <value>] [--authors <value>]\n\nFLAGS\n  --authors=<value>     [default: Terra Money <core@terra.money>]\n  --framework=<option>  [default: react] Choose the frontend framework you want to use. Non-react framework options have\n                        better wallet-provider support but less streamlined contract integration.\n                        <options: react|vue|svelte|next|vite|lit|none>\n  --path=<value>        [default: .] Path to create the workspace\n  --version=<value>     [default: 1.0]\n\nDESCRIPTION\n  Create new dapp from template.\n\nEXAMPLES\n  $ terrain new awesome-dapp\n\n  $ terrain new awesome-dapp --path path/to/dapp\n\n  $ terrain new awesome-dapp --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\n\n  $ terrain new awesome-dapp --path path/to/dapp --framework vue --authors \"ExampleAuthor<example@email.domain>\"\n```\n\n_See code: [src/commands/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/new.ts)_\n\n## `terrain optimize [CONTRACT]`\n\nOptimize wasm bytecode.\n\n```\nUSAGE\n  $ terrain optimize [CONTRACT] [--workspace <value>] [--arm64]\n\nFLAGS\n  --arm64              use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\n                       quicker on arm64 hardware during development.\n  --workspace=<value>\n\nDESCRIPTION\n  Optimize wasm bytecode.\n```\n\n_See code: [src/commands/optimize.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/optimize.ts)_\n\n## `terrain sync-refs [FILE]`\n\nSync configuration with frontend app.\n\n```\nUSAGE\n  $ terrain sync-refs [FILE] [--refs-path <value>] [--dest <value>]\n\nFLAGS\n  --dest=<value>       [default: ./frontend/src/refs.terrain.json]\n  --refs-path=<value>  [default: ./refs.terrain.json]\n\nDESCRIPTION\n  Sync configuration with frontend app.\n```\n\n_See code: [src/commands/sync-refs.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/sync-refs.ts)_\n\n## `terrain task:new [TASK]`\n\ncreate new task\n\n```\nUSAGE\n  $ terrain task:new [TASK]\n\nDESCRIPTION\n  create new task\n```\n\n_See code: [src/commands/task/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/task/new.ts)_\n\n## `terrain task:run [TASK]`\n\nrun predefined task\n\n```\nUSAGE\n  $ terrain task:run [TASK] [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path\n    <value>]\n\nFLAGS\n  --config-path=<value>  [default: config.terrain.json]\n  --keys-path=<value>    [default: keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --refs-path=<value>    [default: refs.terrain.json]\n\nDESCRIPTION\n  run predefined task\n```\n\n_See code: [src/commands/task/run.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/task/run.ts)_\n\n## `terrain test CONTRACT-NAME`\n\nRuns unit tests for a contract directory.\n\n```\nUSAGE\n  $ terrain test [CONTRACT-NAME] [--no-fail-fast]\n\nFLAGS\n  --no-fail-fast  Run all tests regardless of failure.\n\nDESCRIPTION\n  Runs unit tests for a contract directory.\n\nEXAMPLES\n  $ terrain test counter\n\n  $ terrain test counter --no-fail-fast\n```\n\n_See code: [src/commands/test.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/test.ts)_\n\n## `terrain test:coverage [CONTRACT-NAME]`\n\nRuns unit tests for a contract directory.\n\n```\nUSAGE\n  $ terrain test:coverage [CONTRACT-NAME]\n\nDESCRIPTION\n  Runs unit tests for a contract directory.\n\nEXAMPLES\n  $ terrain test:coverage\n\n  $ terrain test:coverage counter\n```\n\n_See code: [src/commands/test/coverage.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/test/coverage.ts)_\n\n## `terrain wallet:new`\n\nGenerate a new wallet to use for signing contracts\n\n```\nUSAGE\n  $ terrain wallet:new [--outfile <value>] [--index <value>]\n\nFLAGS\n  --index=<value>    key index to use, default value is 0\n  --outfile=<value>  absolute path to store the mnemonic key to. If omitted, output to stdout\n\nDESCRIPTION\n  Generate a new wallet to use for signing contracts\n```\n\n_See code: [src/commands/wallet/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/wallet/new.ts)_\n<!-- commandsstop -->\r\n* [`terrain build [CONTRACT]`](#terrain-build-contract)\r\n* [`terrain console`](#terrain-console)\r\n* [`terrain contract:instantiate CONTRACT`](#terrain-contractinstantiate-contract)\r\n* [`terrain contract:migrate [CONTRACT]`](#terrain-contractmigrate-contract)\r\n* [`terrain contract:new NAME`](#terrain-contractnew-name)\r\n* [`terrain contract:store CONTRACT`](#terrain-contractstore-contract)\r\n* [`terrain contract:updateAdmin CONTRACT ADMIN`](#terrain-contractupdateadmin-contract-admin)\r\n* [`terrain deploy CONTRACT`](#terrain-deploy-contract)\r\n* [`terrain help [COMMAND]`](#terrain-help-command)\r\n* [`terrain new NAME`](#terrain-new-name)\r\n* [`terrain optimize [CONTRACT]`](#terrain-optimize-contract)\r\n* [`terrain sync-refs [FILE]`](#terrain-sync-refs-file)\r\n* [`terrain task:new [TASK]`](#terrain-tasknew-task)\r\n* [`terrain task:run [TASK]`](#terrain-taskrun-task)\r\n* [`terrain test CONTRACT-NAME`](#terrain-test-contract-name)\r\n* [`terrain test:coverage [CONTRACT-NAME]`](#terrain-testcoverage-contract-name)\r\n* [`terrain wallet:new`](#terrain-walletnew)\r\n\r\n## `terrain build [CONTRACT]`\r\n\r\nBuild and optimize wasm bytecode.\r\n\r\n```\r\nUSAGE\r\n  $ terrain build [CONTRACT] [--no-optimize] [--workspace <value>] [--arm64]\r\n\r\nFLAGS\r\n  --arm64              use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                       quicker on arm64 hardware during development.\r\n  --no-optimize        do not optimize the wasm.\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Build and optimize wasm bytecode.\r\n```\r\n\r\n_See code: [src/commands/build.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/build.ts)_\r\n\r\n## `terrain console`\r\n\r\nStart a repl console that provides context and convinient utilities to interact with the blockchain and your contracts.\r\n\r\n```\r\nUSAGE\r\n  $ terrain console [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: config.terrain.json]\r\n  --keys-path=<value>    [default: keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  Start a repl console that provides context and convinient utilities to interact with the blockchain and your\r\n  contracts.\r\n```\r\n\r\n_See code: [src/commands/console.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/console.ts)_\r\n\r\n## `terrain contract:instantiate CONTRACT`\r\n\r\nInstantiate the contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:instantiate [CONTRACT] --signer <value> [--network <value>] [--config-path <value>] [--refs-path\r\n    <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>] [--set-signer-as-admin]\r\n\r\nFLAGS\r\n  --code-id=<value>      target code id for migration, can do only once after columbus-5 upgrade\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --set-signer-as-admin\r\n  --signer=<value>       (required)\r\n\r\nDESCRIPTION\r\n  Instantiate the contract.\r\n```\r\n\r\n_See code: [src/commands/contract/instantiate.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/contract/instantiate.ts)_\r\n\r\n## `terrain contract:migrate [CONTRACT]`\r\n\r\nMigrate the contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:migrate [CONTRACT] --signer <value> [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>] [--workspace <value>]\r\n    [--arm64]\r\n\r\nFLAGS\r\n  --arm64                use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                         quicker on arm64 hardware during development.\r\n  --code-id=<value>      target code id for migration\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --no-rebuild           deploy the wasm bytecode as is.\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       (required)\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Migrate the contract.\r\n```\r\n\r\n_See code: [src/commands/contract/migrate.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/contract/migrate.ts)_\r\n\r\n## `terrain contract:new NAME`\r\n\r\nGenerate new contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:new [NAME] [--path <value>] [--version <value>] [--authors <value>]\r\n\r\nFLAGS\r\n  --authors=<value>  [default: Terra Money <core@terra.money>]\r\n  --path=<value>     [default: ./contracts] path to keep the contracts\r\n  --version=<value>  [default: 1.0-beta6]\r\n\r\nDESCRIPTION\r\n  Generate new contract.\r\n\r\nEXAMPLES\r\n  $ terrain code:new awesome_contract\r\n\r\n  $ terrain code:new awesome_contract --path path/to/dapp\r\n\r\n  $ terrain code:new awesome_contract --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\r\n```\r\n\r\n_See code: [src/commands/contract/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/contract/new.ts)_\r\n\r\n## `terrain contract:store CONTRACT`\r\n\r\nStore code on chain.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:store [CONTRACT] --signer <value> [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--code-id <value>] [--workspace <value>]\r\n\r\nFLAGS\r\n  --code-id=<value>\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --no-rebuild\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       (required)\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Store code on chain.\r\n```\r\n\r\n_See code: [src/commands/contract/store.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/contract/store.ts)_\r\n\r\n## `terrain contract:updateAdmin CONTRACT ADMIN`\r\n\r\nUpdate the admin of a contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:updateAdmin [CONTRACT] [ADMIN] --signer <value> [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       (required)\r\n\r\nDESCRIPTION\r\n  Update the admin of a contract.\r\n```\r\n\r\n_See code: [src/commands/contract/updateAdmin.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/contract/updateAdmin.ts)_\r\n\r\n## `terrain deploy CONTRACT`\r\n\r\nBuild wasm bytecode, store code on chain and instantiate.\r\n\r\n```\r\nUSAGE\r\n  $ terrain deploy [CONTRACT] --signer <value> [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--set-signer-as-admin] [--admin-address\r\n    <value>] [--frontend-refs-path <value>] [--workspace <value>] [--arm64]\r\n\r\nFLAGS\r\n  --admin-address=<value>       set custom address as contract admin to allow migration.\r\n  --arm64                       use rust-optimizer-arm64 for optimization. Not recommended for production, but it will\r\n                                optimize quicker on arm64 hardware during development.\r\n  --config-path=<value>         [default: ./config.terrain.json]\r\n  --frontend-refs-path=<value>  [default: ./frontend/src/refs.terrain.json]\r\n  --instance-id=<value>         [default: default]\r\n  --keys-path=<value>           [default: ./keys.terrain.js]\r\n  --network=<value>             [default: localterra]\r\n  --no-rebuild                  deploy the wasm bytecode as is.\r\n  --refs-path=<value>           [default: ./refs.terrain.json]\r\n  --set-signer-as-admin         set signer (deployer) as admin to allow migration.\r\n  --signer=<value>              (required)\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Build wasm bytecode, store code on chain and instantiate.\r\n```\r\n\r\n_See code: [src/commands/deploy.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/deploy.ts)_\r\n\r\n## `terrain help [COMMAND]`\r\n\r\ndisplay help for terrain\r\n\r\n```\r\nUSAGE\r\n  $ terrain help [COMMAND] [--all]\r\n\r\nARGUMENTS\r\n  COMMAND  command to show help for\r\n\r\nFLAGS\r\n  --all  see all commands in CLI\r\n\r\nDESCRIPTION\r\n  display help for terrain\r\n```\r\n\r\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_\r\n\r\n## `terrain new NAME`\r\n\r\nCreate new dapp from template.\r\n\r\n```\r\nUSAGE\r\n  $ terrain new [NAME] [--path <value>] [--framework react|vue|svelte|next|vite|lit] [--version <value>]\r\n    [--authors <value>]\r\n\r\nFLAGS\r\n  --authors=<value>     [default: Terra Money <core@terra.money>]\r\n  --framework=<option>  [default: react] Choose the frontend framework you want to use. Non-react framework options have\r\n                        better wallet-provider support but less streamlined contract integration.\r\n                        <options: react|vue|svelte|next|vite|lit>\r\n  --path=<value>        [default: .] Path to create the workspace\r\n  --version=<value>     [default: 1.0]\r\n\r\nDESCRIPTION\r\n  Create new dapp from template.\r\n\r\nEXAMPLES\r\n  $ terrain new awesome-dapp\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp --framework vue --authors \"ExampleAuthor<example@email.domain>\"\r\n```\r\n\r\n_See code: [src/commands/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/new.ts)_\r\n\r\n## `terrain optimize [CONTRACT]`\r\n\r\nOptimize wasm bytecode.\r\n\r\n```\r\nUSAGE\r\n  $ terrain optimize [CONTRACT] [--workspace <value>] [--arm64]\r\n\r\nFLAGS\r\n  --arm64              use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                       quicker on arm64 hardware during development.\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Optimize wasm bytecode.\r\n```\r\n\r\n_See code: [src/commands/optimize.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/optimize.ts)_\r\n\r\n## `terrain sync-refs [FILE]`\r\n\r\nSync configuration with frontend app.\r\n\r\n```\r\nUSAGE\r\n  $ terrain sync-refs [FILE] [--refs-path <value>] [--dest <value>]\r\n\r\nFLAGS\r\n  --dest=<value>       [default: ./frontend/src/refs.terrain.json]\r\n  --refs-path=<value>  [default: ./refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  Sync configuration with frontend app.\r\n```\r\n\r\n_See code: [src/commands/sync-refs.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/sync-refs.ts)_\r\n\r\n## `terrain task:new [TASK]`\r\n\r\ncreate new task\r\n\r\n```\r\nUSAGE\r\n  $ terrain task:new [TASK]\r\n\r\nDESCRIPTION\r\n  create new task\r\n```\r\n\r\n_See code: [src/commands/task/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/task/new.ts)_\r\n\r\n## `terrain task:run [TASK]`\r\n\r\nrun predefined task\r\n\r\n```\r\nUSAGE\r\n  $ terrain task:run [TASK] [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path\r\n    <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: config.terrain.json]\r\n  --keys-path=<value>    [default: keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  run predefined task\r\n```\r\n\r\n_See code: [src/commands/task/run.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/task/run.ts)_\r\n\r\n## `terrain test CONTRACT-NAME`\r\n\r\nRuns unit tests for a contract directory.\r\n\r\n```\r\nUSAGE\r\n  $ terrain test [CONTRACT-NAME] [--no-fail-fast]\r\n\r\nFLAGS\r\n  --no-fail-fast  Run all tests regardless of failure.\r\n\r\nDESCRIPTION\r\n  Runs unit tests for a contract directory.\r\n\r\nEXAMPLES\r\n  $ terrain test counter\r\n\r\n  $ terrain test counter --no-fail-fast\r\n```\r\n\r\n_See code: [src/commands/test.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/test.ts)_\r\n\r\n## `terrain test:coverage [CONTRACT-NAME]`\r\n\r\nRuns unit tests for a contract directory.\r\n\r\n```\r\nUSAGE\r\n  $ terrain test:coverage [CONTRACT-NAME]\r\n\r\nDESCRIPTION\r\n  Runs unit tests for a contract directory.\r\n\r\nEXAMPLES\r\n  $ terrain test:coverage\r\n\r\n  $ terrain test:coverage counter\r\n```\r\n\r\n_See code: [src/commands/test/coverage.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/test/coverage.ts)_\r\n\r\n## `terrain wallet:new`\r\n\r\nGenerate a new wallet.\r\n\r\n```\r\nUSAGE\r\n  $ terrain wallet:new [--outfile <value>] [--index <value>]\r\n\r\nFLAGS\r\n  --index=<value>    key index to use, default value is 0\r\n  --outfile=<value>  absolute path to store the mnemonic key to. If omitted, output to stdout\r\n\r\nDESCRIPTION\r\n  Generate a new wallet.\r\n```\r\n\r\n_See code: [src/commands/wallet/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/wallet/new.ts)_\r\n<!-- commandsstop -->\r\n* [`terrain console`](#terrain-console)\r\n* [`terrain contract:instantiate CONTRACT`](#terrain-contractinstantiate-contract)\r\n* [`terrain contract:migrate CONTRACT`](#terrain-contractmigrate-contract)\r\n* [`terrain contract:new NAME`](#terrain-contractnew-name)\r\n* [`terrain contract:store CONTRACT`](#terrain-contractstore-contract)\r\n* [`terrain contract:updateAdmin CONTRACT ADMIN`](#terrain-contractupdateadmin-contract-admin)\r\n* [`terrain deploy CONTRACT`](#terrain-deploy-contract)\r\n* [`terrain help [COMMAND]`](#terrain-help-command)\r\n* [`terrain new NAME`](#terrain-new-name)\r\n* [`terrain sync-refs [FILE]`](#terrain-sync-refs-file)\r\n* [`terrain task:new [TASK]`](#terrain-tasknew-task)\r\n* [`terrain task:run [TASK]`](#terrain-taskrun-task)\r\n* [`terrain test CONTRACT-NAME`](#terrain-test-contract-name)\r\n* [`terrain test:coverage [CONTRACT-NAME]`](#terrain-testcoverage-contract-name)\r\n* [`terrain wallet:new`](#terrain-walletnew)\r\n\r\n## `terrain console`\r\n\r\nStart a repl console that provides context and convinient utilities to interact with the blockchain and your contracts.\r\n\r\n```\r\nUSAGE\r\n  $ terrain console [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: config.terrain.json]\r\n  --keys-path=<value>    [default: keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  Start a repl console that provides context and convinient utilities to interact with the blockchain and your\r\n  contracts.\r\n```\r\n\r\n_See code: [src/commands/console.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/console.ts)_\r\n\r\n## `terrain contract:instantiate CONTRACT`\r\n\r\nInstantiate the contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:instantiate [CONTRACT] [--signer <value>] [--set-signer-as-admin] [--network <value>] [--config-path\r\n    <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>]\r\n\r\nFLAGS\r\n  --code-id=<value>      specfic codeId to instantiate\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --set-signer-as-admin  set signer (deployer) as admin to allow migration.\r\n  --signer=<value>       [default: test1]\r\n\r\nDESCRIPTION\r\n  Instantiate the contract.\r\n```\r\n\r\n_See code: [src/commands/contract/instantiate.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/contract/instantiate.ts)_\r\n\r\n## `terrain contract:migrate CONTRACT`\r\n\r\nMigrate the contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:migrate [CONTRACT] [--signer <value>] [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>] [--arm64]\r\n\r\nFLAGS\r\n  --arm64                use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                         quicker on arm64 hardware during development.\r\n  --code-id=<value>      target code id for migration\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --no-rebuild           deploy the wasm bytecode as is.\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       [default: test1]\r\n\r\nDESCRIPTION\r\n  Migrate the contract.\r\n```\r\n\r\n_See code: [src/commands/contract/migrate.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/contract/migrate.ts)_\r\n\r\n## `terrain contract:new NAME`\r\n\r\nGenerate new contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:new [NAME] [--path <value>] [--version <value>] [--authors <value>]\r\n\r\nFLAGS\r\n  --authors=<value>  [default: Terra Money <core@terra.money>]\r\n  --path=<value>     [default: ./contracts] path to keep the contracts\r\n  --version=<value>  [default: 1.0-beta6]\r\n\r\nDESCRIPTION\r\n  Generate new contract.\r\n\r\nEXAMPLES\r\n  $ terrain code:new awesome_contract\r\n\r\n  $ terrain code:new awesome_contract --path path/to/dapp\r\n\r\n  $ terrain code:new awesome_contract --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\r\n```\r\n\r\n_See code: [src/commands/contract/new.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/contract/new.ts)_\r\n\r\n## `terrain contract:store CONTRACT`\r\n\r\nStore code on chain.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:store [CONTRACT] [--signer <value>] [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--code-id <value>]\r\n\r\nFLAGS\r\n  --code-id=<value>\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --no-rebuild           deploy the wasm bytecode as is.\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       [default: test1]\r\n\r\nDESCRIPTION\r\n  Store code on chain.\r\n```\r\n\r\n_See code: [src/commands/contract/store.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/contract/store.ts)_\r\n\r\n## `terrain contract:updateAdmin CONTRACT ADMIN`\r\n\r\nUpdate the admin of a contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:updateAdmin [CONTRACT] [ADMIN] [--signer <value>] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       [default: test1]\r\n\r\nDESCRIPTION\r\n  Update the admin of a contract.\r\n```\r\n\r\n_See code: [src/commands/contract/updateAdmin.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/contract/updateAdmin.ts)_\r\n\r\n## `terrain deploy CONTRACT`\r\n\r\nBuild wasm bytecode, store code on chain and instantiate.\r\n\r\n```\r\nUSAGE\r\n  $ terrain deploy [CONTRACT] [--signer <value>] [--arm64] [--no-rebuild] [--set-signer-as-admin] [--network\r\n    <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>]\r\n    [--admin-address <value>] [--frontend-refs-path <value>]\r\n\r\nFLAGS\r\n  --admin-address=<value>       set custom address as contract admin to allow migration.\r\n  --arm64                       use rust-optimizer-arm64 for optimization. Not recommended for production, but it will\r\n                                optimize quicker on arm64 hardware during development.\r\n  --config-path=<value>         [default: ./config.terrain.json]\r\n  --frontend-refs-path=<value>  [default: ./frontend/src/refs.terrain.json]\r\n  --instance-id=<value>         [default: default] enable management of multiple instances of the same contract\r\n  --keys-path=<value>           [default: ./keys.terrain.js]\r\n  --network=<value>             [default: localterra]\r\n  --no-rebuild                  deploy the wasm bytecode as is.\r\n  --refs-path=<value>           [default: ./refs.terrain.json]\r\n  --set-signer-as-admin         set signer (deployer) as admin to allow migration.\r\n  --signer=<value>              [default: test1]\r\n\r\nDESCRIPTION\r\n  Build wasm bytecode, store code on chain and instantiate.\r\n```\r\n\r\n_See code: [src/commands/deploy.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/deploy.ts)_\r\n\r\n## `terrain help [COMMAND]`\r\n\r\ndisplay help for terrain\r\n\r\n```\r\nUSAGE\r\n  $ terrain help [COMMAND] [--all]\r\n\r\nARGUMENTS\r\n  COMMAND  command to show help for\r\n\r\nFLAGS\r\n  --all  see all commands in CLI\r\n\r\nDESCRIPTION\r\n  display help for terrain\r\n```\r\n\r\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_\r\n\r\n## `terrain new NAME`\r\n\r\nCreate new dapp from template.\r\n\r\n```\r\nUSAGE\r\n  $ terrain new [NAME] [--path <value>] [--framework react|vue|svelte|next|vite|lit] [--version <value>]\r\n    [--authors <value>]\r\n\r\nFLAGS\r\n  --authors=<value>     [default: Terra Money <core@terra.money>]\r\n  --framework=<option>  [default: react] Choose the frontend framework you want to use. Non-react framework options have\r\n                        better wallet-provider support but less streamlined contract integration.\r\n                        <options: react|vue|svelte|next|vite|lit>\r\n  --path=<value>        [default: .] Path to create the workspace\r\n  --version=<value>     [default: 1.0]\r\n\r\nDESCRIPTION\r\n  Create new dapp from template.\r\n\r\nEXAMPLES\r\n  $ terrain new awesome-dapp\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp --framework vue --authors \"ExampleAuthor<example@email.domain>\"\r\n```\r\n\r\n_See code: [src/commands/new.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/new.ts)_\r\n\r\n## `terrain sync-refs [FILE]`\r\n\r\nSync configuration with frontend app.\r\n\r\n```\r\nUSAGE\r\n  $ terrain sync-refs [FILE] [--refs-path <value>] [--dest <value>]\r\n\r\nFLAGS\r\n  --dest=<value>       [default: ./frontend/src/refs.terrain.json]\r\n  --refs-path=<value>  [default: ./refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  Sync configuration with frontend app.\r\n```\r\n\r\n_See code: [src/commands/sync-refs.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/sync-refs.ts)_\r\n\r\n## `terrain task:new [TASK]`\r\n\r\ncreate new task\r\n\r\n```\r\nUSAGE\r\n  $ terrain task:new [TASK]\r\n\r\nDESCRIPTION\r\n  create new task\r\n```\r\n\r\n_See code: [src/commands/task/new.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/task/new.ts)_\r\n\r\n## `terrain task:run [TASK]`\r\n\r\nrun predefined task\r\n\r\n```\r\nUSAGE\r\n  $ terrain task:run [TASK] [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path\r\n    <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: config.terrain.json]\r\n  --keys-path=<value>    [default: keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  run predefined task\r\n```\r\n\r\n_See code: [src/commands/task/run.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/task/run.ts)_\r\n\r\n## `terrain test CONTRACT-NAME`\r\n\r\nRuns unit tests for a contract directory.\r\n\r\n```\r\nUSAGE\r\n  $ terrain test [CONTRACT-NAME] [--no-fail-fast]\r\n\r\nFLAGS\r\n  --no-fail-fast  Run all tests regardless of failure.\r\n\r\nDESCRIPTION\r\n  Runs unit tests for a contract directory.\r\n\r\nEXAMPLES\r\n  $ terrain test counter\r\n\r\n  $ terrain test counter --no-fail-fast\r\n```\r\n\r\n_See code: [src/commands/test.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/test.ts)_\r\n\r\n## `terrain test:coverage [CONTRACT-NAME]`\r\n\r\nRuns unit tests for a contract directory.\r\n\r\n```\r\nUSAGE\r\n  $ terrain test:coverage [CONTRACT-NAME]\r\n\r\nDESCRIPTION\r\n  Runs unit tests for a contract directory.\r\n\r\nEXAMPLES\r\n  $ terrain test:coverage\r\n\r\n  $ terrain test:coverage counter\r\n```\r\n\r\n_See code: [src/commands/test/coverage.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/test/coverage.ts)_\r\n\r\n## `terrain wallet:new`\r\n\r\nGenerate a new wallet to use for signing contracts\r\n\r\n```\r\nUSAGE\r\n  $ terrain wallet:new [--outfile <value>] [--index <value>]\r\n\r\nFLAGS\r\n  --index=<value>    key index to use, default value is 0\r\n  --outfile=<value>  absolute path to store the mnemonic key to. If omitted, output to stdout\r\n\r\nDESCRIPTION\r\n  Generate a new wallet to use for signing contracts\r\n```\r\n\r\n_See code: [src/commands/wallet/new.ts](https://github.com/terra-money/terrain/blob/v0.4.0/src/commands/wallet/new.ts)_\r\n<!-- commandsstop -->\n","engines":{"node":">=12.0.0"},"gitHead":"95f6b22804dbbbe4a1884d23fd6822914810cc83","scripts":{"use":"node ./bin/run","lint":"eslint . --ext .ts --config .eslintrc.js","test":"jest","fixlint":"eslint . --ext .ts --config .eslintrc.js --fix","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","version":"oclif-dev readme && git add README.md","postpack":"rm -f oclif.manifest.json","posttest":"eslint . --ext .ts --config .eslintrc","test:watch":"jest --watch","prepack:use":"npm run prepack && npm run use"},"_npmUser":{"name":"cosullivan","email":"cain.osullivan@gmail.com"},"repository":{"url":"git+https://github.com/terra-money/terrain.git","type":"git"},"_npmVersion":"8.5.1","description":"Terra development environment","directories":{},"_nodeVersion":"16.14.0","dependencies":{"toml":"^3.0.0","yaml":"^1.10.2","chalk":"^4.0.0","ramda":"^0.26.1","tslib":"^1.14.1","cli-ux":"^5.6.3","adm-zip":"^0.5.9","ts-node":"^8.10.2","fs-extra":"^8.1.0","superagent":"^6.1.0","@oclif/core":"^1.0.11","@oclif/config":"^1.17.0","@oclif/command":"^1.8.0","@oclif/plugin-help":"^5.1.12","@terra-money/terra.js":"^3.1.0","@oclif/plugin-not-found":"^2.3.1","@terra-money/template-scaffolding":"1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","eslint":"^8.12.0","prettier":"2.4.1","babel-jest":"^27.3.1","typescript":"^3.9.10","@babel/core":"^7.16.0","@types/jest":"^27.0.2","@types/node":"^10.17.60","@types/ramda":"^0.26.0","@oclif/dev-cli":"^1.26.10","@types/adm-zip":"^0.4.34","@types/fs-extra":"^9.0.13","@babel/preset-env":"^7.16.0","@types/superagent":"^4.1.13","eslint-plugin-import":"^2.25.4","@babel/preset-typescript":"^7.16.0","@typescript-eslint/parser":"^5.18.0","eslint-config-airbnb-base":"^15.0.0","@typescript-eslint/eslint-plugin":"^5.18.0"},"_npmOperationalInternal":{"tmp":"tmp/terrain_0.5.0-beta6_1655086825545_0.38307623307025396","host":"s3://npm-registry-packages"}},"0.5.0-beta7":{"name":"@anchor-protocol/terrain","version":"0.5.0-beta7","keywords":["oclif"],"author":{"name":"Supanat Potiwarakorn @iboss-ptk"},"license":"MIT","_id":"@anchor-protocol/terrain@0.5.0-beta7","maintainers":[{"name":"radzionchachura","email":"radzion@terra.money"},{"name":"amitpr","email":"17amitprasad@gmail.com"},{"name":"mandrean","email":"mandrean@pm.me"},{"name":"simke9445","email":"simke9445@gmail.com"},{"name":"cosullivan","email":"cain.osullivan@gmail.com"},{"name":"hanjukim","email":"hanjukim@gmail.com"},{"name":"kjessec","email":"jesse@soob.co"}],"homepage":"https://github.com/terra-money/terrain","bugs":{"url":"https://github.com/terra-money/terrain/issues"},"bin":{"terrain":"bin/run"},"dist":{"shasum":"73f846a57554d6b746e857928fb740de676137e6","tarball":"https://registry.npmjs.org/@anchor-protocol/terrain/-/terrain-0.5.0-beta7.tgz","fileCount":61,"integrity":"sha512-uBuI1TSpK4CBBxwIyArAQAlzPuC8ZmxVbzlHTmzJosgmoHQZCRP4//n0/ZAjjg36UR5Ep6Bru8ylVwgoEhaXhg==","signatures":[{"sig":"MEQCIBvFi3/F01k1lcN4skN0osPc88x+ZSHrrYXMv4408ZfYAiAfB7QKFkrxVVHovxDardAnAG1NTTt4602gJMijwDG+Kg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":164312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqsENACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiFA//bEUP3rNCpLWYk32/6TYqbnKtxwVW1r4dYU80uxZwMH4HhkoD\r\n58T+7sfHTww9GIZmF3GEZJ7seWqusCVHd2HLF6uDNDtGYxI/a5q4b9WUQucf\r\nFH23ZkV/Twzejlt8+DyZqw2U9vs2LqzEwEIMvlpZInWOfGLAOJ2NAc6SH4FN\r\nrRf0AWmmj6jr70xK/92ENHRoSdGKwpB/HzguNRE76xP+Z7PXjrdQVNI7vOg2\r\nNeWOUIEHoIRhkBhv1aA32ECoouEUnEQtIRU2/6XnCND2fKO1fsjzR/V7TpYz\r\nWtYaOkgNPiirUvHORiIpwREdFTRf4j/U7LcKCWlGw0w2W0Zd2p2BcSAST8ti\r\nb9EBKXGg/R8KxwzpmszutXVm9TyGna7NLEd0Af8JqC8pRVjUlGtQ5vK9poDz\r\nAcGYbHqERydK9AKD58ltpcpsycQvSfZKQnNaG/p3rqJPKgbRry7QhC4P1psk\r\nWKN1LdLOr3CNJqvsC7jjYyN7TImD3kKFAnc7H/9mBBtsAm3r7JVPfNahfZyW\r\nIvCueBddamQWdsfQqCkZR+khympkrGr8IIIAPlNX0n8B3KDkkCutYt4YxU4R\r\np07+GDvbrmY1G0ta7+AwcnaD5UhSvnu7kCevmKB4kvqYWwqGk3Is1pKgHDuK\r\npufxGw0dMNnlxyLZWhhJk66N5V0BKpdZsfE=\r\n=xAzt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","oclif":{"bin":"terrain","plugins":["@oclif/plugin-help","@oclif/plugin-not-found"],"commands":"./lib/commands","helpClass":"./lib/lib/help"},"types":"lib/index.d.ts","engines":{"node":">=12.0.0"},"gitHead":"c366d70f32b96a177db56eae19cb2070320d2a67","scripts":{"use":"node ./bin/run","lint":"eslint . --ext .ts --config .eslintrc.js","test":"jest","fixlint":"eslint . --ext .ts --config .eslintrc.js --fix","prepack":"rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme","version":"oclif-dev readme && git add README.md","postpack":"rm -f oclif.manifest.json","posttest":"eslint . --ext .ts --config .eslintrc","test:watch":"jest --watch","prepack:use":"npm run prepack && npm run use"},"_npmUser":{"name":"cosullivan","email":"cain.osullivan@gmail.com"},"repository":{"url":"git+https://github.com/terra-money/terrain.git","type":"git"},"_npmVersion":"8.5.1","description":"Terra development environment","directories":{},"_nodeVersion":"16.14.0","dependencies":{"toml":"^3.0.0","yaml":"^1.10.2","chalk":"^4.0.0","ramda":"^0.26.1","tslib":"^1.14.1","cli-ux":"^5.6.3","adm-zip":"^0.5.9","ts-node":"^8.10.2","fs-extra":"^8.1.0","superagent":"^6.1.0","@oclif/core":"^1.0.11","@oclif/config":"^1.17.0","@oclif/command":"^1.8.0","@oclif/plugin-help":"^5.1.12","@terra-money/terra.js":"^3.1.0","@oclif/plugin-not-found":"^2.3.1","@terra-money/template-scaffolding":"1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","eslint":"^8.12.0","prettier":"2.4.1","babel-jest":"^27.3.1","typescript":"^3.9.10","@babel/core":"^7.16.0","@types/jest":"^27.0.2","@types/node":"^10.17.60","@types/ramda":"^0.26.0","@oclif/dev-cli":"^1.26.10","@types/adm-zip":"^0.4.34","@types/fs-extra":"^9.0.13","@babel/preset-env":"^7.16.0","@types/superagent":"^4.1.13","eslint-plugin-import":"^2.25.4","@babel/preset-typescript":"^7.16.0","@typescript-eslint/parser":"^5.18.0","eslint-config-airbnb-base":"^15.0.0","@typescript-eslint/eslint-plugin":"^5.18.0"},"_npmOperationalInternal":{"tmp":"tmp/terrain_0.5.0-beta7_1655357709407_0.2928534006827972","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-06-12T08:13:49.671Z","modified":"2026-07-07T17:54:58.866Z","0.5.0-beta4":"2022-06-12T08:13:49.907Z","0.5.0-beta5":"2022-06-12T08:24:00.659Z","0.5.0-beta6":"2022-06-13T02:20:25.718Z","0.5.0-beta7":"2022-06-16T05:35:09.623Z"},"bugs":{"url":"https://github.com/terra-money/terrain/issues"},"author":{"name":"Supanat Potiwarakorn @iboss-ptk"},"license":"MIT","homepage":"https://github.com/terra-money/terrain","keywords":["oclif"],"repository":{"url":"git+https://github.com/terra-money/terrain.git","type":"git"},"description":"Terra development environment","maintainers":[{"email":"hanjukim@gmail.com","name":"hanjukim"},{"email":"jesse@soob.co","name":"kjessec"},{"email":"cain.osullivan@gmail.com","name":"cosullivan"},{"email":"radzion@terra.money","name":"radzionchachura"},{"email":"mandrean@pm.me","name":"mandrean"},{"email":"17amitprasad@gmail.com","name":"amitpr"},{"email":"devops@terra.money","name":"terra-devops"}],"readme":"# Terrain\r\n\r\n<p align=\"center\" >\r\n<a alt=\"terrain logo is generative, click to see the code!\" href=\"https://editor.p5js.org/iboss-ptk/sketches/-mAM5HzH_\">\r\n<img src=\"./logo.png\" alt=\"terrain logo\" width=\"200\"/>\r\n</a>\r\n</p>\r\n\r\n<p align=\"center\" >\r\n<b>Terrain</b> – A Terra development environment for seamless smart contract development.\r\n</p>\r\n\r\n---\r\n\r\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) [![Version](https://img.shields.io/npm/v/terrain.svg)](https://npmjs.org/package/terrain) [![Downloads/week](https://img.shields.io/npm/dw/terrain.svg)](https://npmjs.org/package/terrain)\r\n\r\nTerrain allows you to:\r\n\r\n- Scaffold a template smart contract and frontend for app development.\r\n- Dramatically simplify the development and deployment process.\r\n\r\nTerrain is **not**:\r\n\r\n- A fully-featured Terra command-line interface (CLI). If you need a fully-featured client, use <a href=\"https://docs.terra.money/docs/develop/how-to/terrad/using-terrad.html\" target=\"_blank\">terrad</a>.\r\n- A Light Client Daemon (LCD). You will still need an RPC endpoint to deploy your contract. <a href=\"https://github.com/terra-money/LocalTerra#readme\" target=\"_blank\">LocalTerra</a> is the recommended option for this.\r\n\r\n---\r\n\r\n# Table of contents\r\n\r\n<!-- toc -->\n* [Terrain](#terrain)\n* [Table of contents](#table-of-contents)\n* [Setup](#setup)\n* [Getting Started](#getting-started)\n* [Migrating CosmWasm Contracts on Terra](#migrating-cosmwasm-contracts-on-terra)\n* [Use Terrain Main Branch Locally](#use-terrain-main-branch-locally)\n* [Terrain Commands](#terrain-commands)\n<!-- tocstop -->\r\n* [Terrain](#terrain)\r\n* [Table of contents](#table-of-contents)\r\n* [Setup](#setup)\r\n* [Getting Started](#getting-started)\r\n* [Migrating CosmWasm Contracts on Terra](#migrating-cosmwasm-contracts-on-terra)\r\n* [Use Terrain Main Branch Locally](#use-terrain-main-branch-locally)\r\n* [Terrain Commands](#terrain-commands)\r\n<!-- tocstop -->\r\n* [Terrain](#terrain)\r\n* [Table of contents](#table-of-contents)\r\n* [Setup](#setup)\r\n* [Getting Started](#getting-started)\r\n* [Migrating CosmWasm Contracts on Terra](#migrating-cosmwasm-contracts-on-terra)\r\n* [Use Terrain Main Branch Locally](#use-terrain-main-branch-locally)\r\n* [Terrain Commands](#terrain-commands)\r\n<!-- tocstop -->\r\n* [Terrain](#terrain)\r\n* [Table of contents](#table-of-contents)\r\n* [Setup](#setup)\r\n* [Getting Started](#getting-started)\r\n* [Migrating CosmWasm Contracts on Terra](#migrating-cosmwasm-contracts-on-terra)\r\n* [Use Terrain Main Branch Locally](#use-terrain-main-branch-locally)\r\n* [Terrain Commands](#terrain-commands)\r\n<!-- tocstop -->\r\n\r\n# Setup\r\n\r\n## Download LocalTerra\r\n\r\nFor testing purposes, we recommend to install and run LocalTerra on your personal computer. Instructions on how to get LocalTerra up and running can be found in the <a href=\"https://github.com/terra-money/LocalTerra#readme\" target=\"_blank\">\r\nLocalTerra documentation</a>.\r\n\r\n<sub>**Note:** _If you are using a Mac with an M1 chip, you might need to update your Docker Desktop due to the <a href=\"https://github.com/docker/for-mac/issues/5561\" target=\"_blank\">qemu bug</a>._</sub>\r\n\r\nOnce all dependencies have been installed, do the following:\r\n\r\n1. Clone the LocalTerra repo.\r\n\r\n```\r\ngit clone https://github.com/terra-money/LocalTerra.git\r\n```\r\n\r\n2. Navigate to the newly created `LocalTerra` directory.\r\n\r\n```\r\ncd LocalTerra\r\n```\r\n\r\n3. Spin up an instance of the environment with `docker-compose`.\r\n\r\n```\r\ndocker-compose up\r\n```\r\n\r\n## Setup Rust\r\n\r\nWhile WASM smart contracts can be written in any programming language, **it is strongly recommended that you utilize Rust**, as it is the only language for which mature libraries and tooling exist for CosmWasm. To complete this tutorial, install the latest version of Rust by following the instructions <a href=\"https://www.rust-lang.org/tools/install\" target=\"_blank\">here</a>. Once Rust is installed on your computer, do the following:\r\n\r\n1. Set the default release channel used to update Rust to stable.\r\n\r\n```sh\r\nrustup default stable\r\n```\r\n\r\n2. Add wasm as the compilation target.\r\n\r\n```sh\r\nrustup target add wasm32-unknown-unknown\r\n```\r\n\r\n3. Install the necessary dependencies for generating contracts.\r\n\r\n```sh\r\ncargo install cargo-run-script\r\n```\r\n\r\n## Install Node JS and NPM\r\n\r\nTo run Terrain, you will need to install Node.js and NPM. We recommend that you install <a href=\"https://nodejs.org/en/download/\" target=\"_blank\">Node.js v16 (LTS)</a>. Node Package Manager (NPM) is automatically installed along with your Node.js download.\r\n\r\n<sub>**Note:** _Use Node.js v16 (LTS) if you encounter the following error code: `error:0308010C:digital envelope routines::unsupported`_</sub>\r\n\r\n# Getting Started\r\n\r\nNow that you have completed the initial setup, generate your first smart contract using the procedure described below.\r\n\r\n1. Install the terrain package globally.\r\n\r\n```sh\r\nnpm install -g @terra-money/terrain\r\n```\r\n\r\n<sub>**Note:** _If you would like to install terrain locally, you can execute the command `npm install @terra-money/terrain`, without the `-g` flag, while in the directory in which you would like to be able to utilize the package. You can then execute any terrain commands by prefixing them with `npx`. For example, to scaffold a new project named `my-terra-dapp` with a locally installed terrain package, you would utilize the command `npx terrain new my-terra-dapp`._</sub>\r\n\r\n2. Generate your smart contract and corresponding frontend templates.\r\n\r\n```sh\r\nterrain new my-terra-dapp\r\n```\r\n\r\n3. Navigate to the new `my-terra-dapp` directory.\r\n\r\n```sh\r\ncd my-terra-dapp\r\n```\r\n\r\n4. Install all necessary Node dependencies in your project.\r\n\r\n```sh\r\nnpm install\r\n```\r\n\r\n## Project Structure\r\n\r\nThe `terrain new` command generates a project that contains a template smart contract called `counter` and a corresponding frontend. Other supporting files are generated to provide further functionality. You may view the project structure below.\r\n\r\n```\r\n.\r\n├── contracts              # the smart contract directory\r\n│   ├── counter            # template smart contract\r\n│   └── ...\r\n├── frontend               # template frontend application\r\n├── lib                    # predefined task and console functions\r\n├── tasks                  # predefined tasks\r\n├── keys.terrain.js        # keys for signing transactions\r\n├── config.terrain.json    # config for connections and contract deployments\r\n└── refs.terrain.json      # deployed code and contract references\r\n```\r\n\r\n## Deployment\r\n\r\nThe `terrain deploy` command does the following:\r\n\r\n- Builds, optimizes and stores the wasm code on the blockchain.\r\n- Instantiates the contract.\r\n\r\nTo deploy your new counter smart contract, run the following command in the terminal.\r\n\r\n```sh\r\nterrain deploy counter --signer test1\r\n```\r\n\r\n<sub> **Note:** _You can also store the wasm code and instantiate the contract separately using the command [`terrain code:store CONTRACT`](#terrain-codestore-contract) followed by [`terrain contract:instantiate CONTRACT`](#terrain-contractmigrate-contract). In this case, you must also run the command `terrain sync-refs` in your project directory to update the `refs.terrain.json` file which references contract deployments on all networks._</sub>\r\n\r\nIn this case, we specify one of the <a href=\"https://github.com/terra-money/LocalTerra#accounts\" target=\"_blank\">preconfigured accounts</a> with balances on LocalTerra, `test1`, as our signer. The signer account will be responsible for paying the gas fee associated with deploying the contract to the Terra blockchain and will be assigned as the owner of the project.\r\n\r\nYou can also specify the network on which you would like to deploy your contract by adding the `--network` flag. If the network is not specified, as is the case in our above example, your contract will be deployed to `localterra` by default. You may also deploy to `mainnet`, the live Terra blockchain, as well as `testnet`, a network similar to mainnet used for testing.\r\n\r\n<br/>\r\n\r\n### Deploying on Testnet or Mainnet\r\n\r\nThe predefined accounts in the `keys.terrain.js` file shown below can be utilized as signers on `testnet`. We will demonstrate how to deploy your smart contract utilizing the preconfigured `custom_tester_1` account. You may also add a personal account to the `keys.terrain.js` file by adding the account name as well as its corresponding private key. You can then use that account as the signer specifying the account name after the `--signer` flag in the `terrain deploy` command.\r\n\r\n<sub>**Warning:** _Utilizing a personal account for deployment requires the use of a private key or mnemonic. These are private keys that are generated upon the creation of your personal wallet. Saving or utilizing these keys on your personal computer may expose them to malicious actors who could gain access to your personal wallet if they are able to obtain them. You can create a wallet solely for testing purposes to eliminate risk. Alternatively, you can store your private keys as secret enviroment variables which you can then reference utilizing `process.env.SECRET_VAR` in `keys.terrain.json`. Use your private key or mnemonic at your own discretion._</sub>\r\n\r\n```js\r\n// can use `process.env.SECRET_MNEMONIC` or `process.env.SECRET_PRIV_KEY`\r\n// to populate secret in CI environment instead of hardcoding\r\n\r\nmodule.exports = {\r\n  custom_tester_1: {\r\n    mnemonic:\r\n      \"shiver position copy catalog upset verify cheap library enjoy extend second peasant basic kit polar business document shrug pass chuckle lottery blind ecology stand\",\r\n  },\r\n  custom_tester_2: {\r\n    privateKey: \"fGl1yNoUnnNUqTUXXhxH9vJU0htlz9lWwBt3fQw+ixw=\",\r\n  },\r\n};\r\n```\r\n\r\nPrior to deploying your contract, ensure that your signer wallet contains the funds needed to pay for associated transaction fees. You can request funds from the <a href=\"https://faucet.terra.money/\" target=\"_blank\">Terra Testnet Faucet</a> by submitting the wallet address of the account where you would like to receive the funds and clicking on the `Send me tokens` button.\r\n\r\nYou can retrieve the wallet address associated with the `custom_tester_1` account by utilizing the `terrain console` in your terminal.\r\n\r\n```sh\r\nterrain console\r\n\r\nterrain > wallets.custom_tester_1.key.accAddress\r\n'terra1qd9fwwgnwmwlu2csv49fgtum3rgms64s8tcavp'\r\n```\r\n\r\nAfter you have received the Luna tokens from the Terra Testnet Faucet, query the balance of your account by utilizing the following command in the terrain console.\r\n\r\n```sh\r\nterrain > (await client.bank.balance(wallets.custom_tester_1.key.accAddress))[0]\r\n```\r\n\r\nFinally, exit the terrain console and deploy the `counter` smart contract to testnet with the `custom_tester_1` account as the signer.\r\n\r\n```sh\r\nterrain deploy counter --signer custom_tester_1 --network testnet\r\n```\r\n\r\n## Initializing the Frontend Template\r\n\r\nAfter deployment, the `refs.terrain.json` file will be updated in the project directory as well as the `frontend/src` directory. These files contain all contract references on all networks. This information is utilized by terrain's utility functions and also the frontend template. An example of `refs.terrain.json` can be found below:\r\n\r\n```json\r\n{\r\n  \"localterra\": {\r\n    \"counter\": {\r\n      \"codeId\": \"1\",\r\n      \"contractAddresses\": {\r\n        \"default\": \"terra18vd8fpwxzck93qlwghaj6arh4p7c5n896xzem5\"\r\n      }\r\n    }\r\n  },\r\n  \"testnet\": {\r\n    \"counter\": {\r\n      \"codeId\": \"18160\",\r\n      \"contractAddresses\": {\r\n        \"default\": \"terra15faphq99pap3fr0dwk46826uqr2usve739l7ms\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n<sub> **Important:** _If you have initialized the contract without using the `terrain deploy` command or have manually changed the `refs.terrain.json` file in the project directory, you will need to sync the references to the `frontend/src` directory in order to ensure frontend functionality. To do so, use the following command: `terrain sync-refs`_</sub>\r\n\r\nAfter you have synced the contract references, navigate to the `frontend` directory and start the application.\r\n\r\n1. Navigate to the `frontend` directory.\r\n\r\n```sh\r\ncd frontend\r\n```\r\n\r\n2. Start the application.\r\n\r\n```sh\r\nnpm run start\r\n```\r\n\r\n<sub> **Note:** _Switching networks in your Terra Station extension will result in a change in reference to the contract address which corresponds with the new network._</sub>\r\n\r\n## Run Contract Functions with Terrain\r\n\r\nOnce you have successfully deployed your project, you can interact with the deployed contract and the underlying blockchain by utilizing functions defined in the `lib/index.js` file. You may also create your own abstractions in this file for querying or executing transactions. The default contents of the `lib/index.js` file are presented below.\r\n\r\n```js\r\n// lib/index.js\r\n\r\nmodule.exports = ({ wallets, refs, config, client }) => ({\r\n  getCount: () => client.query(\"counter\", { get_count: {} }),\r\n  increment: (signer = wallets.test1) =>\r\n    client.execute(signer, \"counter\", { increment: {} }),\r\n});\r\n```\r\n\r\nYou can call the functions defined above inside of the `terrain console`. An example using the `counter` smart contract is shown below.\r\n\r\n```sh\r\nterrain console\r\nterrain > await lib.getCount()\r\n{ count: 0 }\r\nterrain > await lib.increment()\r\nterrain > await lib.getCount()\r\n{ count: 1 }\r\n```\r\n\r\nYou may also specify which network you would like to interact with by utilizing the `--network` flag with the `terrain console` command.\r\n\r\n```\r\nterrain console --network NETWORK\r\n```\r\n\r\n## Creating Tasks\r\n\r\nYou can also utilize the functions available inside of the `lib/index.js` file to create tasks. Tasks are utilized in order to automate the execution of sequential functions or commands. An example task is provided for you in the `tasks/example-with-lib.js` file in your project directory.\r\n\r\n```js\r\n// tasks/example-with-lib.js\r\n\r\nconst { task } = require(\"@terra-money/terrain\");\r\nconst lib = require(\"../lib\");\r\n\r\ntask(async (env) => {\r\n  const { getCount, increment } = lib(env);\r\n  console.log(\"count 1 = \", await getCount());\r\n  await increment();\r\n  console.log(\"count 2 = \", await getCount());\r\n});\r\n```\r\n\r\nTo run the example task shown above, which is located in the `tasks/example-with-lib.js` file, run the following command in the terminal.\r\n\r\n```sh\r\nterrain task:run example-with-lib\r\n```\r\n\r\nIn order to create a new task, run the following command replacing `<task-name>` with the desired name for your new task.\r\n\r\n```sh\r\nterrain task:new <task-name>\r\n```\r\n\r\nIf you would like to utilize JavaScript in your functions or tasks, you can import Terra.js. The `tasks/example-custom-logic.js` file contains an example of a task that utilizes Terra.js functionality. To learn more about Terra.js, view the <a href=\"https://terra-money.github.io/terra.js/\" target=\"_blank\">Terra.js documentation</a>.\r\n\r\n```js\r\n// tasks/example-custom-logic.js\r\n\r\nconst { task, terrajs } = require(\"@terra-money/terrain\");\r\n\r\n// terrajs is basically re-exported terra.js (https://terra-money.github.io/terra.js/)\r\n\r\ntask(async ({ wallets, refs, config, client }) => {\r\n  console.log(\"creating new key\");\r\n  const key = terrajs.MnemonicKey();\r\n  console.log(\"private key\", key.privateKey.toString(\"base64\"));\r\n  console.log(\"mnemonic\", key.mnemonic);\r\n});\r\n```\r\n\r\nAs of Terrain 0.4.0 it is possible to deploy and instantiate contracts from tasks. This can be useful for multi-contract, or multi-stage deployments. \r\n\r\n```js\r\nconst { task } = require(\"@terra-money/terrain\");\r\n\r\ntask(async ({ wallets, client, deploy }) => {\r\n  // First deploy the counter smart contract.\r\n  const counterCodeId = await deploy.storeCode(wallets.test1, \"counter\");\r\n  const counterAddress = await deploy.instantiate(\r\n    // Signer\r\n    wallets.test1,\r\n    // Contract name\r\n    \"counter\",\r\n    // Code ID\r\n    counterCodeId,\r\n    // Instance ID\r\n    \"default\",\r\n    // Contract admin\r\n    wallets.test1.key.accAddress\r\n  );\r\n\r\n  // Now deploy a CW20 with the counter contract set as the minter in instantiation.\r\n  const cw20CodeId = await deploy.storeCode(wallets.test1, \"cw20-base\");\r\n  const cw20Address = await deploy.instantiate(\r\n    wallets.test1,\r\n    \"cw20-base\",\r\n    cw20CodeId,\r\n    \"default\",\r\n    wallets.test1.key.accAddress,\r\n    // Custom instantiation message.\r\n    // with no message provided the default from config.terrain will be used.\r\n    {\r\n      name: \"counter\",\r\n      symbol: \"CTR\",\r\n      decimals: 6,\r\n      initial_balances: [],\r\n      mint: {\r\n        minter: counterAddress,\r\n      },\r\n    }\r\n  );\r\n\r\n  // Update the CW20 address in counter.\r\n  // Note: It's important to use the address returned by deploy.instantiate\r\n  // Refs are only read into memory at the start of the task.\r\n  await client.execute(wallets.test1, counterAddress, {\r\n    update_token: { token: cw20Address },\r\n  });\r\n\r\n  console.log(`CW20 Address: ${cw20Address}`);\r\n});\r\n```\r\n---\r\n\r\n# Migrating CosmWasm Contracts on Terra\r\n\r\nOn Terra it is possible to initalize contracts as migratable. This functionallity allows the adminstrator to upload a new version of the contract, then send a migrate message to move to the new code.\r\n\r\n<a href=\"https://docs.terra.money/docs/develop/dapp/quick-start/contract-migration.html\" target=\"_blank\">This tutorial</a> builds on top of the Terrain Quick Start Guide and walks you through a contract migration.\r\n\r\n## Adding MigrateMsg to the Contract\r\n\r\nIn order for a contract to be migratable, it must satisfy the following two requirements:\r\n\r\n1. The smart contract handles the `MigrateMsg` transaction.\r\n2. The smart contract has an admininstrator set.\r\n\r\nTo implement support for `MigrateMsg`, add the message to the `msg.rs` file. To do so, navigate to `msg.rs` and place the following code just above the `InstantiateMsg` struct.\r\n\r\n```rust\r\n#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]\r\npub struct MigrateMsg {}\r\n```\r\n\r\nWith `MigrateMsg` defined, update the `contract.rs` file. First, update the import from `crate::msg` to include `MigrateMsg`.\r\n\r\n```rust\r\nuse crate::msg::{CountResponse, ExecuteMsg, InstantiateMsg, QueryMsg, MigrateMsg};\r\n```\r\n\r\nNext, add the following method above `instantiate`.\r\n\r\n```rust\r\n#[cfg_attr(not(feature = \"library\"), entry_point)]\r\npub fn migrate(_deps: DepsMut, _env: Env, _msg: MigrateMsg) -> StdResult<Response> {\r\n    Ok(Response::default())\r\n}\r\n```\r\n\r\n## Migrating the Contract\r\n\r\nIn the previous Terrain tutorial, we deployed the contract, but did not initilize it as migratable.\r\n\r\nAfter adding MigrateMsg to the smart contract, we can redeploy the contract and add the `--set-signer-as-admin` flag. This allows the transaction signer to migrate the contract in the future.\r\n\r\n```sh\r\nterrain deploy counter --signer test1 --set-signer-as-admin\r\n```\r\n\r\nIf you decide to make changes to the deployed contract, you can migrate to the updated code by executing the following command.\r\n\r\n```sh\r\nterrain contract:migrate counter --signer test1\r\n```\r\n\r\n# Use Terrain Main Branch Locally\r\n\r\nIn some cases, the latest features or bug fixes may be integrated into the main branch of the <a href=\"https://github.com/terra-money/terrain\" target=\"_blank\">Terrain Github repo</a>, but not yet released to the corresponding <a href=\"https://www.npmjs.com/package/@terra-money/terrain\" target=\"_blank\">npm package</a>. Subsequently, you may want to use the latest version of Terrain available on Github before it has been released to npm. The below described method may also be utilized if you are interested in developing on and contributing to Terrain.\r\n\r\n<sub>**Warning:** _Features and bug fixes that are implemented on the latest version of Terrain may still be subject to testing. As such, you should only use the main branch of the Terrain github repo in exceptional circumstances. In all other cases, use the npm package._</sub>\r\n\r\nTo use the main branch of the Terrain repo on your local machine, do the following:\r\n\r\n1. Clone the repo.\r\n\r\n```\r\ngit clone --branch main --depth 1 https://github.com/terra-money/terrain\r\n```\r\n\r\n2. Navigate to the project folder.\r\n\r\n```\r\ncd terrain\r\n```\r\n\r\n3. Inside the project folder, install all necessary node dependencies.\r\n\r\n```\r\nnpm install\r\n```\r\n\r\n4.  Run the `npm link` command to link the project to your global terrain instance.\r\n\r\n```\r\nnpm link\r\n```\r\n\r\nTo unlink the terrain command from the cloned repository and revert back to the default functionality you can run the command below.\r\n\r\n```\r\nnpm unlink terrain\r\n```\r\n\r\n---\r\n\r\n# Terrain Commands\r\n\r\n<!-- commands -->\n* [`terrain build [CONTRACT]`](#terrain-build-contract)\n* [`terrain console`](#terrain-console)\n* [`terrain contract:instantiate CONTRACT`](#terrain-contractinstantiate-contract)\n* [`terrain contract:migrate CONTRACT`](#terrain-contractmigrate-contract)\n* [`terrain contract:new NAME`](#terrain-contractnew-name)\n* [`terrain contract:store CONTRACT`](#terrain-contractstore-contract)\n* [`terrain contract:updateAdmin CONTRACT ADMIN`](#terrain-contractupdateadmin-contract-admin)\n* [`terrain deploy CONTRACT`](#terrain-deploy-contract)\n* [`terrain help [COMMAND]`](#terrain-help-command)\n* [`terrain new NAME`](#terrain-new-name)\n* [`terrain optimize [CONTRACT]`](#terrain-optimize-contract)\n* [`terrain sync-refs [FILE]`](#terrain-sync-refs-file)\n* [`terrain task:new [TASK]`](#terrain-tasknew-task)\n* [`terrain task:run [TASK]`](#terrain-taskrun-task)\n* [`terrain test CONTRACT-NAME`](#terrain-test-contract-name)\n* [`terrain test:coverage [CONTRACT-NAME]`](#terrain-testcoverage-contract-name)\n* [`terrain wallet:new`](#terrain-walletnew)\n\n## `terrain build [CONTRACT]`\n\nBuild and optimize wasm bytecode.\n\n```\nUSAGE\n  $ terrain build [CONTRACT] [--optimize] [--workspace <value>] [--arm64]\n\nFLAGS\n  --arm64              use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\n                       quicker on arm64 hardware during development.\n  --optimize           optimize the wasm after the build.\n  --workspace=<value>\n\nDESCRIPTION\n  Build and optimize wasm bytecode.\n```\n\n_See code: [src/commands/build.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/build.ts)_\n\n## `terrain console`\n\nStart a repl console that provides context and convinient utilities to interact with the blockchain and your contracts.\n\n```\nUSAGE\n  $ terrain console [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>]\n\nFLAGS\n  --config-path=<value>  [default: config.terrain.json]\n  --keys-path=<value>    [default: keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --refs-path=<value>    [default: refs.terrain.json]\n\nDESCRIPTION\n  Start a repl console that provides context and convinient utilities to interact with the blockchain and your\n  contracts.\n```\n\n_See code: [src/commands/console.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/console.ts)_\n\n## `terrain contract:instantiate CONTRACT`\n\nInstantiate the contract.\n\n```\nUSAGE\n  $ terrain contract:instantiate [CONTRACT] [--signer <value>] [--set-signer-as-admin] [--network <value>] [--config-path\n    <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>]\n\nFLAGS\n  --code-id=<value>      specfic codeId to instantiate\n  --config-path=<value>  [default: ./config.terrain.json]\n  --instance-id=<value>  [default: default]\n  --keys-path=<value>    [default: ./keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --refs-path=<value>    [default: ./refs.terrain.json]\n  --set-signer-as-admin  set signer (deployer) as admin to allow migration.\n  --signer=<value>       [default: test1]\n\nDESCRIPTION\n  Instantiate the contract.\n```\n\n_See code: [src/commands/contract/instantiate.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/contract/instantiate.ts)_\n\n## `terrain contract:migrate CONTRACT`\n\nMigrate the contract.\n\n```\nUSAGE\n  $ terrain contract:migrate [CONTRACT] [--signer <value>] [--arm64] [--build] [--network <value>] [--config-path\n    <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>] [--workspace\n    <value>]\n\nFLAGS\n  --arm64                use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\n                         quicker on arm64 hardware during development.\n  --build                rebuild the wasm before deploying.\n  --code-id=<value>      target code id for migration\n  --config-path=<value>  [default: ./config.terrain.json]\n  --instance-id=<value>  [default: default]\n  --keys-path=<value>    [default: ./keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --refs-path=<value>    [default: ./refs.terrain.json]\n  --signer=<value>       [default: test1]\n  --workspace=<value>\n\nDESCRIPTION\n  Migrate the contract.\n```\n\n_See code: [src/commands/contract/migrate.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/contract/migrate.ts)_\n\n## `terrain contract:new NAME`\n\nGenerate new contract.\n\n```\nUSAGE\n  $ terrain contract:new [NAME] [--path <value>] [--version <value>] [--authors <value>]\n\nFLAGS\n  --authors=<value>  [default: Terra Money <core@terra.money>]\n  --path=<value>     [default: ./contracts] path to keep the contracts\n  --version=<value>  [default: 1.0-beta6]\n\nDESCRIPTION\n  Generate new contract.\n\nEXAMPLES\n  $ terrain code:new awesome_contract\n\n  $ terrain code:new awesome_contract --path path/to/dapp\n\n  $ terrain code:new awesome_contract --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\n```\n\n_See code: [src/commands/contract/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/contract/new.ts)_\n\n## `terrain contract:store CONTRACT`\n\nStore code on chain.\n\n```\nUSAGE\n  $ terrain contract:store [CONTRACT] [--signer <value>] [--no-rebuild] [--network <value>] [--config-path <value>]\n    [--refs-path <value>] [--keys-path <value>] [--code-id <value>] [--workspace <value>]\n\nFLAGS\n  --code-id=<value>\n  --config-path=<value>  [default: ./config.terrain.json]\n  --keys-path=<value>    [default: ./keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --no-rebuild           deploy the wasm bytecode as is.\n  --refs-path=<value>    [default: ./refs.terrain.json]\n  --signer=<value>       [default: test1]\n  --workspace=<value>\n\nDESCRIPTION\n  Store code on chain.\n```\n\n_See code: [src/commands/contract/store.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/contract/store.ts)_\n\n## `terrain contract:updateAdmin CONTRACT ADMIN`\n\nUpdate the admin of a contract.\n\n```\nUSAGE\n  $ terrain contract:updateAdmin [CONTRACT] [ADMIN] [--signer <value>] [--network <value>] [--config-path <value>]\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>]\n\nFLAGS\n  --config-path=<value>  [default: ./config.terrain.json]\n  --instance-id=<value>  [default: default]\n  --keys-path=<value>    [default: ./keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --refs-path=<value>    [default: ./refs.terrain.json]\n  --signer=<value>       [default: test1]\n\nDESCRIPTION\n  Update the admin of a contract.\n```\n\n_See code: [src/commands/contract/updateAdmin.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/contract/updateAdmin.ts)_\n\n## `terrain deploy CONTRACT`\n\nBuild wasm bytecode, store code on chain and instantiate.\n\n```\nUSAGE\n  $ terrain deploy [CONTRACT] [--signer <value>] [--arm64] [--build] [--set-signer-as-admin] [--network\n    <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>]\n    [--admin-address <value>] [--frontend-refs-path <value>] [--sync] [--workspace <value>]\n\nFLAGS\n  --admin-address=<value>       set custom address as contract admin to allow migration.\n  --arm64                       use rust-optimizer-arm64 for optimization. Not recommended for production, but it will\n                                optimize quicker on arm64 hardware during development.\n  --build                       rebuild the wasm before deploying.\n  --config-path=<value>         [default: ./config.terrain.json]\n  --frontend-refs-path=<value>  [default: ./frontend/src/refs.terrain.json]\n  --instance-id=<value>         [default: default] enable management of multiple instances of the same contract\n  --keys-path=<value>           [default: ./keys.terrain.js]\n  --network=<value>             [default: localterra]\n  --refs-path=<value>           [default: ./refs.terrain.json]\n  --set-signer-as-admin         set signer (deployer) as admin to allow migration.\n  --signer=<value>              [default: test1]\n  --sync                        sync the contracts to the frontend.\n  --workspace=<value>\n\nDESCRIPTION\n  Build wasm bytecode, store code on chain and instantiate.\n```\n\n_See code: [src/commands/deploy.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/deploy.ts)_\n\n## `terrain help [COMMAND]`\n\ndisplay help for terrain\n\n```\nUSAGE\n  $ terrain help [COMMAND] [--all]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nFLAGS\n  --all  see all commands in CLI\n\nDESCRIPTION\n  display help for terrain\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_\n\n## `terrain new NAME`\n\nCreate new dapp from template.\n\n```\nUSAGE\n  $ terrain new [NAME] [--path <value>] [--framework react|vue|svelte|next|vite|lit|none] [--version\n    <value>] [--authors <value>]\n\nFLAGS\n  --authors=<value>     [default: Terra Money <core@terra.money>]\n  --framework=<option>  [default: react] Choose the frontend framework you want to use. Non-react framework options have\n                        better wallet-provider support but less streamlined contract integration.\n                        <options: react|vue|svelte|next|vite|lit|none>\n  --path=<value>        [default: .] Path to create the workspace\n  --version=<value>     [default: 1.0]\n\nDESCRIPTION\n  Create new dapp from template.\n\nEXAMPLES\n  $ terrain new awesome-dapp\n\n  $ terrain new awesome-dapp --path path/to/dapp\n\n  $ terrain new awesome-dapp --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\n\n  $ terrain new awesome-dapp --path path/to/dapp --framework vue --authors \"ExampleAuthor<example@email.domain>\"\n```\n\n_See code: [src/commands/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/new.ts)_\n\n## `terrain optimize [CONTRACT]`\n\nOptimize wasm bytecode.\n\n```\nUSAGE\n  $ terrain optimize [CONTRACT] [--workspace <value>] [--arm64]\n\nFLAGS\n  --arm64              use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\n                       quicker on arm64 hardware during development.\n  --workspace=<value>\n\nDESCRIPTION\n  Optimize wasm bytecode.\n```\n\n_See code: [src/commands/optimize.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/optimize.ts)_\n\n## `terrain sync-refs [FILE]`\n\nSync configuration with frontend app.\n\n```\nUSAGE\n  $ terrain sync-refs [FILE] [--refs-path <value>] [--dest <value>]\n\nFLAGS\n  --dest=<value>       [default: ./frontend/src/refs.terrain.json]\n  --refs-path=<value>  [default: ./refs.terrain.json]\n\nDESCRIPTION\n  Sync configuration with frontend app.\n```\n\n_See code: [src/commands/sync-refs.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/sync-refs.ts)_\n\n## `terrain task:new [TASK]`\n\ncreate new task\n\n```\nUSAGE\n  $ terrain task:new [TASK]\n\nDESCRIPTION\n  create new task\n```\n\n_See code: [src/commands/task/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/task/new.ts)_\n\n## `terrain task:run [TASK]`\n\nrun predefined task\n\n```\nUSAGE\n  $ terrain task:run [TASK] [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path\n    <value>]\n\nFLAGS\n  --config-path=<value>  [default: config.terrain.json]\n  --keys-path=<value>    [default: keys.terrain.js]\n  --network=<value>      [default: localterra]\n  --refs-path=<value>    [default: refs.terrain.json]\n\nDESCRIPTION\n  run predefined task\n```\n\n_See code: [src/commands/task/run.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/task/run.ts)_\n\n## `terrain test CONTRACT-NAME`\n\nRuns unit tests for a contract directory.\n\n```\nUSAGE\n  $ terrain test [CONTRACT-NAME] [--no-fail-fast]\n\nFLAGS\n  --no-fail-fast  Run all tests regardless of failure.\n\nDESCRIPTION\n  Runs unit tests for a contract directory.\n\nEXAMPLES\n  $ terrain test counter\n\n  $ terrain test counter --no-fail-fast\n```\n\n_See code: [src/commands/test.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/test.ts)_\n\n## `terrain test:coverage [CONTRACT-NAME]`\n\nRuns unit tests for a contract directory.\n\n```\nUSAGE\n  $ terrain test:coverage [CONTRACT-NAME]\n\nDESCRIPTION\n  Runs unit tests for a contract directory.\n\nEXAMPLES\n  $ terrain test:coverage\n\n  $ terrain test:coverage counter\n```\n\n_See code: [src/commands/test/coverage.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/test/coverage.ts)_\n\n## `terrain wallet:new`\n\nGenerate a new wallet to use for signing contracts\n\n```\nUSAGE\n  $ terrain wallet:new [--outfile <value>] [--index <value>]\n\nFLAGS\n  --index=<value>    key index to use, default value is 0\n  --outfile=<value>  absolute path to store the mnemonic key to. If omitted, output to stdout\n\nDESCRIPTION\n  Generate a new wallet to use for signing contracts\n```\n\n_See code: [src/commands/wallet/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta7/src/commands/wallet/new.ts)_\n<!-- commandsstop -->\r\n* [`terrain build [CONTRACT]`](#terrain-build-contract)\r\n* [`terrain console`](#terrain-console)\r\n* [`terrain contract:instantiate CONTRACT`](#terrain-contractinstantiate-contract)\r\n* [`terrain contract:migrate CONTRACT`](#terrain-contractmigrate-contract)\r\n* [`terrain contract:new NAME`](#terrain-contractnew-name)\r\n* [`terrain contract:store CONTRACT`](#terrain-contractstore-contract)\r\n* [`terrain contract:updateAdmin CONTRACT ADMIN`](#terrain-contractupdateadmin-contract-admin)\r\n* [`terrain deploy CONTRACT`](#terrain-deploy-contract)\r\n* [`terrain help [COMMAND]`](#terrain-help-command)\r\n* [`terrain new NAME`](#terrain-new-name)\r\n* [`terrain optimize [CONTRACT]`](#terrain-optimize-contract)\r\n* [`terrain sync-refs [FILE]`](#terrain-sync-refs-file)\r\n* [`terrain task:new [TASK]`](#terrain-tasknew-task)\r\n* [`terrain task:run [TASK]`](#terrain-taskrun-task)\r\n* [`terrain test CONTRACT-NAME`](#terrain-test-contract-name)\r\n* [`terrain test:coverage [CONTRACT-NAME]`](#terrain-testcoverage-contract-name)\r\n* [`terrain wallet:new`](#terrain-walletnew)\r\n\r\n## `terrain build [CONTRACT]`\r\n\r\nBuild and optimize wasm bytecode.\r\n\r\n```\r\nUSAGE\r\n  $ terrain build [CONTRACT] [--optimize] [--workspace <value>] [--arm64]\r\n\r\nFLAGS\r\n  --arm64              use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                       quicker on arm64 hardware during development.\r\n  --optimize           optimize the wasm after the build.\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Build and optimize wasm bytecode.\r\n```\r\n\r\n_See code: [src/commands/build.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/build.ts)_\r\n\r\n## `terrain console`\r\n\r\nStart a repl console that provides context and convinient utilities to interact with the blockchain and your contracts.\r\n\r\n```\r\nUSAGE\r\n  $ terrain console [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: config.terrain.json]\r\n  --keys-path=<value>    [default: keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  Start a repl console that provides context and convinient utilities to interact with the blockchain and your\r\n  contracts.\r\n```\r\n\r\n_See code: [src/commands/console.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/console.ts)_\r\n\r\n## `terrain contract:instantiate CONTRACT`\r\n\r\nInstantiate the contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:instantiate [CONTRACT] [--signer <value>] [--set-signer-as-admin] [--network <value>] [--config-path\r\n    <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>]\r\n\r\nFLAGS\r\n  --code-id=<value>      specfic codeId to instantiate\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --set-signer-as-admin  set signer (deployer) as admin to allow migration.\r\n  --signer=<value>       [default: test1]\r\n\r\nDESCRIPTION\r\n  Instantiate the contract.\r\n```\r\n\r\n_See code: [src/commands/contract/instantiate.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/contract/instantiate.ts)_\r\n\r\n## `terrain contract:migrate CONTRACT`\r\n\r\nMigrate the contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:migrate [CONTRACT] [--signer <value>] [--arm64] [--build] [--network <value>] [--config-path\r\n    <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>] [--workspace\r\n    <value>]\r\n\r\nFLAGS\r\n  --arm64                use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                         quicker on arm64 hardware during development.\r\n  --build                rebuild the wasm before deploying.\r\n  --code-id=<value>      target code id for migration\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       [default: test1]\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Migrate the contract.\r\n```\r\n\r\n_See code: [src/commands/contract/migrate.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/contract/migrate.ts)_\r\n\r\n## `terrain contract:new NAME`\r\n\r\nGenerate new contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:new [NAME] [--path <value>] [--version <value>] [--authors <value>]\r\n\r\nFLAGS\r\n  --authors=<value>  [default: Terra Money <core@terra.money>]\r\n  --path=<value>     [default: ./contracts] path to keep the contracts\r\n  --version=<value>  [default: 1.0-beta6]\r\n\r\nDESCRIPTION\r\n  Generate new contract.\r\n\r\nEXAMPLES\r\n  $ terrain code:new awesome_contract\r\n\r\n  $ terrain code:new awesome_contract --path path/to/dapp\r\n\r\n  $ terrain code:new awesome_contract --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\r\n```\r\n\r\n_See code: [src/commands/contract/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/contract/new.ts)_\r\n\r\n## `terrain contract:store CONTRACT`\r\n\r\nStore code on chain.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:store [CONTRACT] [--signer <value>] [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--code-id <value>] [--workspace <value>]\r\n\r\nFLAGS\r\n  --code-id=<value>\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --no-rebuild           deploy the wasm bytecode as is.\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       [default: test1]\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Store code on chain.\r\n```\r\n\r\n_See code: [src/commands/contract/store.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/contract/store.ts)_\r\n\r\n## `terrain contract:updateAdmin CONTRACT ADMIN`\r\n\r\nUpdate the admin of a contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:updateAdmin [CONTRACT] [ADMIN] [--signer <value>] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       [default: test1]\r\n\r\nDESCRIPTION\r\n  Update the admin of a contract.\r\n```\r\n\r\n_See code: [src/commands/contract/updateAdmin.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/contract/updateAdmin.ts)_\r\n\r\n## `terrain deploy CONTRACT`\r\n\r\nBuild wasm bytecode, store code on chain and instantiate.\r\n\r\n```\r\nUSAGE\r\n  $ terrain deploy [CONTRACT] [--signer <value>] [--arm64] [--build] [--set-signer-as-admin] [--network\r\n    <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>]\r\n    [--admin-address <value>] [--frontend-refs-path <value>] [--sync] [--workspace <value>]\r\n\r\nFLAGS\r\n  --admin-address=<value>       set custom address as contract admin to allow migration.\r\n  --arm64                       use rust-optimizer-arm64 for optimization. Not recommended for production, but it will\r\n                                optimize quicker on arm64 hardware during development.\r\n  --build                       rebuild the wasm before deploying.\r\n  --config-path=<value>         [default: ./config.terrain.json]\r\n  --frontend-refs-path=<value>  [default: ./frontend/src/refs.terrain.json]\r\n  --instance-id=<value>         [default: default] enable management of multiple instances of the same contract\r\n  --keys-path=<value>           [default: ./keys.terrain.js]\r\n  --network=<value>             [default: localterra]\r\n  --refs-path=<value>           [default: ./refs.terrain.json]\r\n  --set-signer-as-admin         set signer (deployer) as admin to allow migration.\r\n  --signer=<value>              [default: test1]\r\n  --sync                        sync the contracts to the frontend.\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Build wasm bytecode, store code on chain and instantiate.\r\n```\r\n\r\n_See code: [src/commands/deploy.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/deploy.ts)_\r\n\r\n## `terrain help [COMMAND]`\r\n\r\ndisplay help for terrain\r\n\r\n```\r\nUSAGE\r\n  $ terrain help [COMMAND] [--all]\r\n\r\nARGUMENTS\r\n  COMMAND  command to show help for\r\n\r\nFLAGS\r\n  --all  see all commands in CLI\r\n\r\nDESCRIPTION\r\n  display help for terrain\r\n```\r\n\r\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_\r\n\r\n## `terrain new NAME`\r\n\r\nCreate new dapp from template.\r\n\r\n```\r\nUSAGE\r\n  $ terrain new [NAME] [--path <value>] [--framework react|vue|svelte|next|vite|lit|none] [--version\r\n    <value>] [--authors <value>]\r\n\r\nFLAGS\r\n  --authors=<value>     [default: Terra Money <core@terra.money>]\r\n  --framework=<option>  [default: react] Choose the frontend framework you want to use. Non-react framework options have\r\n                        better wallet-provider support but less streamlined contract integration.\r\n                        <options: react|vue|svelte|next|vite|lit|none>\r\n  --path=<value>        [default: .] Path to create the workspace\r\n  --version=<value>     [default: 1.0]\r\n\r\nDESCRIPTION\r\n  Create new dapp from template.\r\n\r\nEXAMPLES\r\n  $ terrain new awesome-dapp\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp --framework vue --authors \"ExampleAuthor<example@email.domain>\"\r\n```\r\n\r\n_See code: [src/commands/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/new.ts)_\r\n\r\n## `terrain optimize [CONTRACT]`\r\n\r\nOptimize wasm bytecode.\r\n\r\n```\r\nUSAGE\r\n  $ terrain optimize [CONTRACT] [--workspace <value>] [--arm64]\r\n\r\nFLAGS\r\n  --arm64              use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                       quicker on arm64 hardware during development.\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Optimize wasm bytecode.\r\n```\r\n\r\n_See code: [src/commands/optimize.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/optimize.ts)_\r\n\r\n## `terrain sync-refs [FILE]`\r\n\r\nSync configuration with frontend app.\r\n\r\n```\r\nUSAGE\r\n  $ terrain sync-refs [FILE] [--refs-path <value>] [--dest <value>]\r\n\r\nFLAGS\r\n  --dest=<value>       [default: ./frontend/src/refs.terrain.json]\r\n  --refs-path=<value>  [default: ./refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  Sync configuration with frontend app.\r\n```\r\n\r\n_See code: [src/commands/sync-refs.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/sync-refs.ts)_\r\n\r\n## `terrain task:new [TASK]`\r\n\r\ncreate new task\r\n\r\n```\r\nUSAGE\r\n  $ terrain task:new [TASK]\r\n\r\nDESCRIPTION\r\n  create new task\r\n```\r\n\r\n_See code: [src/commands/task/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/task/new.ts)_\r\n\r\n## `terrain task:run [TASK]`\r\n\r\nrun predefined task\r\n\r\n```\r\nUSAGE\r\n  $ terrain task:run [TASK] [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path\r\n    <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: config.terrain.json]\r\n  --keys-path=<value>    [default: keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  run predefined task\r\n```\r\n\r\n_See code: [src/commands/task/run.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/task/run.ts)_\r\n\r\n## `terrain test CONTRACT-NAME`\r\n\r\nRuns unit tests for a contract directory.\r\n\r\n```\r\nUSAGE\r\n  $ terrain test [CONTRACT-NAME] [--no-fail-fast]\r\n\r\nFLAGS\r\n  --no-fail-fast  Run all tests regardless of failure.\r\n\r\nDESCRIPTION\r\n  Runs unit tests for a contract directory.\r\n\r\nEXAMPLES\r\n  $ terrain test counter\r\n\r\n  $ terrain test counter --no-fail-fast\r\n```\r\n\r\n_See code: [src/commands/test.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/test.ts)_\r\n\r\n## `terrain test:coverage [CONTRACT-NAME]`\r\n\r\nRuns unit tests for a contract directory.\r\n\r\n```\r\nUSAGE\r\n  $ terrain test:coverage [CONTRACT-NAME]\r\n\r\nDESCRIPTION\r\n  Runs unit tests for a contract directory.\r\n\r\nEXAMPLES\r\n  $ terrain test:coverage\r\n\r\n  $ terrain test:coverage counter\r\n```\r\n\r\n_See code: [src/commands/test/coverage.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/test/coverage.ts)_\r\n\r\n## `terrain wallet:new`\r\n\r\nGenerate a new wallet to use for signing contracts\r\n\r\n```\r\nUSAGE\r\n  $ terrain wallet:new [--outfile <value>] [--index <value>]\r\n\r\nFLAGS\r\n  --index=<value>    key index to use, default value is 0\r\n  --outfile=<value>  absolute path to store the mnemonic key to. If omitted, output to stdout\r\n\r\nDESCRIPTION\r\n  Generate a new wallet to use for signing contracts\r\n```\r\n\r\n_See code: [src/commands/wallet/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta6/src/commands/wallet/new.ts)_\r\n<!-- commandsstop -->\r\n* [`terrain build [CONTRACT]`](#terrain-build-contract)\r\n* [`terrain console`](#terrain-console)\r\n* [`terrain contract:instantiate CONTRACT`](#terrain-contractinstantiate-contract)\r\n* [`terrain contract:migrate [CONTRACT]`](#terrain-contractmigrate-contract)\r\n* [`terrain contract:new NAME`](#terrain-contractnew-name)\r\n* [`terrain contract:store CONTRACT`](#terrain-contractstore-contract)\r\n* [`terrain contract:updateAdmin CONTRACT ADMIN`](#terrain-contractupdateadmin-contract-admin)\r\n* [`terrain deploy CONTRACT`](#terrain-deploy-contract)\r\n* [`terrain help [COMMAND]`](#terrain-help-command)\r\n* [`terrain new NAME`](#terrain-new-name)\r\n* [`terrain optimize [CONTRACT]`](#terrain-optimize-contract)\r\n* [`terrain sync-refs [FILE]`](#terrain-sync-refs-file)\r\n* [`terrain task:new [TASK]`](#terrain-tasknew-task)\r\n* [`terrain task:run [TASK]`](#terrain-taskrun-task)\r\n* [`terrain test CONTRACT-NAME`](#terrain-test-contract-name)\r\n* [`terrain test:coverage [CONTRACT-NAME]`](#terrain-testcoverage-contract-name)\r\n* [`terrain wallet:new`](#terrain-walletnew)\r\n\r\n## `terrain build [CONTRACT]`\r\n\r\nBuild and optimize wasm bytecode.\r\n\r\n```\r\nUSAGE\r\n  $ terrain build [CONTRACT] [--no-optimize] [--workspace <value>] [--arm64]\r\n\r\nFLAGS\r\n  --arm64              use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                       quicker on arm64 hardware during development.\r\n  --no-optimize        do not optimize the wasm.\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Build and optimize wasm bytecode.\r\n```\r\n\r\n_See code: [src/commands/build.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/build.ts)_\r\n\r\n## `terrain console`\r\n\r\nStart a repl console that provides context and convinient utilities to interact with the blockchain and your contracts.\r\n\r\n```\r\nUSAGE\r\n  $ terrain console [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: config.terrain.json]\r\n  --keys-path=<value>    [default: keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  Start a repl console that provides context and convinient utilities to interact with the blockchain and your\r\n  contracts.\r\n```\r\n\r\n_See code: [src/commands/console.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/console.ts)_\r\n\r\n## `terrain contract:instantiate CONTRACT`\r\n\r\nInstantiate the contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:instantiate [CONTRACT] --signer <value> [--network <value>] [--config-path <value>] [--refs-path\r\n    <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>] [--set-signer-as-admin]\r\n\r\nFLAGS\r\n  --code-id=<value>      target code id for migration, can do only once after columbus-5 upgrade\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --set-signer-as-admin\r\n  --signer=<value>       (required)\r\n\r\nDESCRIPTION\r\n  Instantiate the contract.\r\n```\r\n\r\n_See code: [src/commands/contract/instantiate.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/contract/instantiate.ts)_\r\n\r\n## `terrain contract:migrate [CONTRACT]`\r\n\r\nMigrate the contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:migrate [CONTRACT] --signer <value> [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>] [--workspace <value>]\r\n    [--arm64]\r\n\r\nFLAGS\r\n  --arm64                use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                         quicker on arm64 hardware during development.\r\n  --code-id=<value>      target code id for migration\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --no-rebuild           deploy the wasm bytecode as is.\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       (required)\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Migrate the contract.\r\n```\r\n\r\n_See code: [src/commands/contract/migrate.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/contract/migrate.ts)_\r\n\r\n## `terrain contract:new NAME`\r\n\r\nGenerate new contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:new [NAME] [--path <value>] [--version <value>] [--authors <value>]\r\n\r\nFLAGS\r\n  --authors=<value>  [default: Terra Money <core@terra.money>]\r\n  --path=<value>     [default: ./contracts] path to keep the contracts\r\n  --version=<value>  [default: 1.0-beta6]\r\n\r\nDESCRIPTION\r\n  Generate new contract.\r\n\r\nEXAMPLES\r\n  $ terrain code:new awesome_contract\r\n\r\n  $ terrain code:new awesome_contract --path path/to/dapp\r\n\r\n  $ terrain code:new awesome_contract --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\r\n```\r\n\r\n_See code: [src/commands/contract/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/contract/new.ts)_\r\n\r\n## `terrain contract:store CONTRACT`\r\n\r\nStore code on chain.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:store [CONTRACT] --signer <value> [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--code-id <value>] [--workspace <value>]\r\n\r\nFLAGS\r\n  --code-id=<value>\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --no-rebuild\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       (required)\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Store code on chain.\r\n```\r\n\r\n_See code: [src/commands/contract/store.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/contract/store.ts)_\r\n\r\n## `terrain contract:updateAdmin CONTRACT ADMIN`\r\n\r\nUpdate the admin of a contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:updateAdmin [CONTRACT] [ADMIN] --signer <value> [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       (required)\r\n\r\nDESCRIPTION\r\n  Update the admin of a contract.\r\n```\r\n\r\n_See code: [src/commands/contract/updateAdmin.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/contract/updateAdmin.ts)_\r\n\r\n## `terrain deploy CONTRACT`\r\n\r\nBuild wasm bytecode, store code on chain and instantiate.\r\n\r\n```\r\nUSAGE\r\n  $ terrain deploy [CONTRACT] --signer <value> [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--set-signer-as-admin] [--admin-address\r\n    <value>] [--frontend-refs-path <value>] [--workspace <value>] [--arm64]\r\n\r\nFLAGS\r\n  --admin-address=<value>       set custom address as contract admin to allow migration.\r\n  --arm64                       use rust-optimizer-arm64 for optimization. Not recommended for production, but it will\r\n                                optimize quicker on arm64 hardware during development.\r\n  --config-path=<value>         [default: ./config.terrain.json]\r\n  --frontend-refs-path=<value>  [default: ./frontend/src/refs.terrain.json]\r\n  --instance-id=<value>         [default: default]\r\n  --keys-path=<value>           [default: ./keys.terrain.js]\r\n  --network=<value>             [default: localterra]\r\n  --no-rebuild                  deploy the wasm bytecode as is.\r\n  --refs-path=<value>           [default: ./refs.terrain.json]\r\n  --set-signer-as-admin         set signer (deployer) as admin to allow migration.\r\n  --signer=<value>              (required)\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Build wasm bytecode, store code on chain and instantiate.\r\n```\r\n\r\n_See code: [src/commands/deploy.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/deploy.ts)_\r\n\r\n## `terrain help [COMMAND]`\r\n\r\ndisplay help for terrain\r\n\r\n```\r\nUSAGE\r\n  $ terrain help [COMMAND] [--all]\r\n\r\nARGUMENTS\r\n  COMMAND  command to show help for\r\n\r\nFLAGS\r\n  --all  see all commands in CLI\r\n\r\nDESCRIPTION\r\n  display help for terrain\r\n```\r\n\r\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_\r\n\r\n## `terrain new NAME`\r\n\r\nCreate new dapp from template.\r\n\r\n```\r\nUSAGE\r\n  $ terrain new [NAME] [--path <value>] [--framework react|vue|svelte|next|vite|lit] [--version <value>]\r\n    [--authors <value>]\r\n\r\nFLAGS\r\n  --authors=<value>     [default: Terra Money <core@terra.money>]\r\n  --framework=<option>  [default: react] Choose the frontend framework you want to use. Non-react framework options have\r\n                        better wallet-provider support but less streamlined contract integration.\r\n                        <options: react|vue|svelte|next|vite|lit>\r\n  --path=<value>        [default: .] Path to create the workspace\r\n  --version=<value>     [default: 1.0]\r\n\r\nDESCRIPTION\r\n  Create new dapp from template.\r\n\r\nEXAMPLES\r\n  $ terrain new awesome-dapp\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\r\n\r\n  $ terrain new awesome-dapp --path path/to/dapp --framework vue --authors \"ExampleAuthor<example@email.domain>\"\r\n```\r\n\r\n_See code: [src/commands/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/new.ts)_\r\n\r\n## `terrain optimize [CONTRACT]`\r\n\r\nOptimize wasm bytecode.\r\n\r\n```\r\nUSAGE\r\n  $ terrain optimize [CONTRACT] [--workspace <value>] [--arm64]\r\n\r\nFLAGS\r\n  --arm64              use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                       quicker on arm64 hardware during development.\r\n  --workspace=<value>\r\n\r\nDESCRIPTION\r\n  Optimize wasm bytecode.\r\n```\r\n\r\n_See code: [src/commands/optimize.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/optimize.ts)_\r\n\r\n## `terrain sync-refs [FILE]`\r\n\r\nSync configuration with frontend app.\r\n\r\n```\r\nUSAGE\r\n  $ terrain sync-refs [FILE] [--refs-path <value>] [--dest <value>]\r\n\r\nFLAGS\r\n  --dest=<value>       [default: ./frontend/src/refs.terrain.json]\r\n  --refs-path=<value>  [default: ./refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  Sync configuration with frontend app.\r\n```\r\n\r\n_See code: [src/commands/sync-refs.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/sync-refs.ts)_\r\n\r\n## `terrain task:new [TASK]`\r\n\r\ncreate new task\r\n\r\n```\r\nUSAGE\r\n  $ terrain task:new [TASK]\r\n\r\nDESCRIPTION\r\n  create new task\r\n```\r\n\r\n_See code: [src/commands/task/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/task/new.ts)_\r\n\r\n## `terrain task:run [TASK]`\r\n\r\nrun predefined task\r\n\r\n```\r\nUSAGE\r\n  $ terrain task:run [TASK] [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path\r\n    <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: config.terrain.json]\r\n  --keys-path=<value>    [default: keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  run predefined task\r\n```\r\n\r\n_See code: [src/commands/task/run.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/task/run.ts)_\r\n\r\n## `terrain test CONTRACT-NAME`\r\n\r\nRuns unit tests for a contract directory.\r\n\r\n```\r\nUSAGE\r\n  $ terrain test [CONTRACT-NAME] [--no-fail-fast]\r\n\r\nFLAGS\r\n  --no-fail-fast  Run all tests regardless of failure.\r\n\r\nDESCRIPTION\r\n  Runs unit tests for a contract directory.\r\n\r\nEXAMPLES\r\n  $ terrain test counter\r\n\r\n  $ terrain test counter --no-fail-fast\r\n```\r\n\r\n_See code: [src/commands/test.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/test.ts)_\r\n\r\n## `terrain test:coverage [CONTRACT-NAME]`\r\n\r\nRuns unit tests for a contract directory.\r\n\r\n```\r\nUSAGE\r\n  $ terrain test:coverage [CONTRACT-NAME]\r\n\r\nDESCRIPTION\r\n  Runs unit tests for a contract directory.\r\n\r\nEXAMPLES\r\n  $ terrain test:coverage\r\n\r\n  $ terrain test:coverage counter\r\n```\r\n\r\n_See code: [src/commands/test/coverage.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/test/coverage.ts)_\r\n\r\n## `terrain wallet:new`\r\n\r\nGenerate a new wallet.\r\n\r\n```\r\nUSAGE\r\n  $ terrain wallet:new [--outfile <value>] [--index <value>]\r\n\r\nFLAGS\r\n  --index=<value>    key index to use, default value is 0\r\n  --outfile=<value>  absolute path to store the mnemonic key to. If omitted, output to stdout\r\n\r\nDESCRIPTION\r\n  Generate a new wallet.\r\n```\r\n\r\n_See code: [src/commands/wallet/new.ts](https://github.com/terra-money/terrain/blob/v0.5.0-beta2/src/commands/wallet/new.ts)_\r\n<!-- commandsstop -->\r\n* [`terrain console`](#terrain-console)\r\n* [`terrain contract:instantiate CONTRACT`](#terrain-contractinstantiate-contract)\r\n* [`terrain contract:migrate CONTRACT`](#terrain-contractmigrate-contract)\r\n* [`terrain contract:new NAME`](#terrain-contractnew-name)\r\n* [`terrain contract:store CONTRACT`](#terrain-contractstore-contract)\r\n* [`terrain contract:updateAdmin CONTRACT ADMIN`](#terrain-contractupdateadmin-contract-admin)\r\n* [`terrain deploy CONTRACT`](#terrain-deploy-contract)\r\n* [`terrain help [COMMAND]`](#terrain-help-command)\r\n* [`terrain new NAME`](#terrain-new-name)\r\n* [`terrain sync-refs [FILE]`](#terrain-sync-refs-file)\r\n* [`terrain task:new [TASK]`](#terrain-tasknew-task)\r\n* [`terrain task:run [TASK]`](#terrain-taskrun-task)\r\n* [`terrain test CONTRACT-NAME`](#terrain-test-contract-name)\r\n* [`terrain test:coverage [CONTRACT-NAME]`](#terrain-testcoverage-contract-name)\r\n* [`terrain wallet:new`](#terrain-walletnew)\r\n\r\n## `terrain console`\r\n\r\nStart a repl console that provides context and convinient utilities to interact with the blockchain and your contracts.\r\n\r\n```\r\nUSAGE\r\n  $ terrain console [--network <value>] [--config-path <value>] [--refs-path <value>] [--keys-path <value>]\r\n\r\nFLAGS\r\n  --config-path=<value>  [default: config.terrain.json]\r\n  --keys-path=<value>    [default: keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: refs.terrain.json]\r\n\r\nDESCRIPTION\r\n  Start a repl console that provides context and convinient utilities to interact with the blockchain and your\r\n  contracts.\r\n```\r\n\r\n_See code: [src/commands/console.ts](https://github.com/terra-money/terrain/blob/v0.4.1/src/commands/console.ts)_\r\n\r\n## `terrain contract:instantiate CONTRACT`\r\n\r\nInstantiate the contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:instantiate [CONTRACT] [--signer <value>] [--set-signer-as-admin] [--network <value>] [--config-path\r\n    <value>] [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>]\r\n\r\nFLAGS\r\n  --code-id=<value>      specfic codeId to instantiate\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --set-signer-as-admin  set signer (deployer) as admin to allow migration.\r\n  --signer=<value>       [default: test1]\r\n\r\nDESCRIPTION\r\n  Instantiate the contract.\r\n```\r\n\r\n_See code: [src/commands/contract/instantiate.ts](https://github.com/terra-money/terrain/blob/v0.4.1/src/commands/contract/instantiate.ts)_\r\n\r\n## `terrain contract:migrate CONTRACT`\r\n\r\nMigrate the contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:migrate [CONTRACT] [--signer <value>] [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--instance-id <value>] [--code-id <value>] [--arm64]\r\n\r\nFLAGS\r\n  --arm64                use rust-optimizer-arm64 for optimization. Not recommended for production, but it will optimize\r\n                         quicker on arm64 hardware during development.\r\n  --code-id=<value>      target code id for migration\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --instance-id=<value>  [default: default]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --no-rebuild           deploy the wasm bytecode as is.\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       [default: test1]\r\n\r\nDESCRIPTION\r\n  Migrate the contract.\r\n```\r\n\r\n_See code: [src/commands/contract/migrate.ts](https://github.com/terra-money/terrain/blob/v0.4.1/src/commands/contract/migrate.ts)_\r\n\r\n## `terrain contract:new NAME`\r\n\r\nGenerate new contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:new [NAME] [--path <value>] [--version <value>] [--authors <value>]\r\n\r\nFLAGS\r\n  --authors=<value>  [default: Terra Money <core@terra.money>]\r\n  --path=<value>     [default: ./contracts] path to keep the contracts\r\n  --version=<value>  [default: 1.0-beta6]\r\n\r\nDESCRIPTION\r\n  Generate new contract.\r\n\r\nEXAMPLES\r\n  $ terrain code:new awesome_contract\r\n\r\n  $ terrain code:new awesome_contract --path path/to/dapp\r\n\r\n  $ terrain code:new awesome_contract --path path/to/dapp --authors \"ExampleAuthor<example@email.domain>\"\r\n```\r\n\r\n_See code: [src/commands/contract/new.ts](https://github.com/terra-money/terrain/blob/v0.4.1/src/commands/contract/new.ts)_\r\n\r\n## `terrain contract:store CONTRACT`\r\n\r\nStore code on chain.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:store [CONTRACT] [--signer <value>] [--no-rebuild] [--network <value>] [--config-path <value>]\r\n    [--refs-path <value>] [--keys-path <value>] [--code-id <value>]\r\n\r\nFLAGS\r\n  --code-id=<value>\r\n  --config-path=<value>  [default: ./config.terrain.json]\r\n  --keys-path=<value>    [default: ./keys.terrain.js]\r\n  --network=<value>      [default: localterra]\r\n  --no-rebuild           deploy the wasm bytecode as is.\r\n  --refs-path=<value>    [default: ./refs.terrain.json]\r\n  --signer=<value>       [default: test1]\r\n\r\nDESCRIPTION\r\n  Store code on chain.\r\n```\r\n\r\n_See code: [src/commands/contract/store.ts](https://github.com/terra-money/terrain/blob/v0.4.1/src/commands/contract/store.ts)_\r\n\r\n## `terrain contract:updateAdmin CONTRACT ADMIN`\r\n\r\nUpdate the admin of a contract.\r\n\r\n```\r\nUSAGE\r\n  $ terrain contract:updateAdmin ","readmeFilename":"README.md"}