.gitpod.yml
README.md
babel.config.js
contract
    Cargo.toml
    README.md
    compile.js
    src
        lib.rs
    target
        .rustc_info.json
        debug
            .fingerprint
                Inflector-43feca6693eacde7
                    lib-inflector.json
                autocfg-ce7784e1ec7b4471
                    lib-autocfg.json
                borsh-derive-c66a001f715b61bd
                    lib-borsh-derive.json
                borsh-derive-internal-47300e99565762f7
                    lib-borsh-derive-internal.json
                borsh-schema-derive-internal-e125f8abee8d6d3c
                    lib-borsh-schema-derive-internal.json
                byteorder-a5b2ef220fa4aa58
                    build-script-build-script-build.json
                convert_case-3e34b674a3055f51
                    lib-convert_case.json
                derive_more-90da512afdf29cec
                    lib-derive_more.json
                generic-array-8f9750ce6db71cdf
                    build-script-build-script-build.json
                hashbrown-4715147519423b9f
                    lib-hashbrown.json
                hashbrown-e6dbeeaf60ba0149
                    run-build-script-build-script-build.json
                hashbrown-fe3d052080e72922
                    build-script-build-script-build.json
                indexmap-12cdf0c04991d5b2
                    run-build-script-build-script-build.json
                indexmap-771e05f56e911434
                    build-script-build-script-build.json
                indexmap-9188af7f2fbde06c
                    lib-indexmap.json
                itoa-d6019665920166ca
                    lib-itoa.json
                memchr-0c2655dece3a5c2a
                    build-script-build-script-build.json
                near-rpc-error-core-ddae6533e865161d
                    lib-near-rpc-error-core.json
                near-rpc-error-macro-4cf3bd44b1c8af0d
                    lib-near-rpc-error-macro.json
                near-sdk-core-a0c8311b5dfc4cfd
                    lib-near-sdk-core.json
                near-sdk-macros-798e2fb2a8a5154c
                    lib-near-sdk-macros.json
                num-bigint-a8b27e1851a47dae
                    build-script-build-script-build.json
                num-integer-3ff85b8c0139205c
                    build-script-build-script-build.json
                num-rational-6afe7dccf089b23c
                    build-script-build-script-build.json
                num-traits-6b7105063d8405e8
                    build-script-build-script-build.json
                proc-macro-crate-cbe39f16c93ce811
                    lib-proc-macro-crate.json
                proc-macro2-6a03fdc1a66cb69b
                    lib-proc-macro2.json
                proc-macro2-8777eb9a9ba47919
                    build-script-build-script-build.json
                proc-macro2-a0a7a6f5ec265d63
                    run-build-script-build-script-build.json
                quote-f9022bfb03d8dff3
                    lib-quote.json
                ryu-b114b7bf20bd588d
                    build-script-build-script-build.json
                ryu-b4079b41f3134326
                    run-build-script-build-script-build.json
                ryu-f9bb3c7becb97891
                    lib-ryu.json
                serde-717545a8fde9d017
                    run-build-script-build-script-build.json
                serde-a72186585efe8ed1
                    build-script-build-script-build.json
                serde-ebe4278c3a11133a
                    lib-serde.json
                serde_derive-09f2f95028200222
                    run-build-script-build-script-build.json
                serde_derive-86ed526aec1da329
                    lib-serde_derive.json
                serde_derive-cf88a84d678ee2e4
                    build-script-build-script-build.json
                serde_json-ba2eea35140cff06
                    lib-serde_json.json
                serde_json-d85ef4522161f5a6
                    run-build-script-build-script-build.json
                serde_json-ed3733fd9def1067
                    build-script-build-script-build.json
                syn-287957610e19250e
                    run-build-script-build-script-build.json
                syn-331a484e788aa9c3
                    build-script-build-script-build.json
                syn-d65eb9871f6bf639
                    lib-syn.json
                toml-9cf6199398334e8d
                    lib-toml.json
                typenum-a15a19a45c376e99
                    build-script-build-script-main.json
                unicode-xid-2d77b7eadf50c62e
                    lib-unicode-xid.json
                version_check-413790463c361025
                    lib-version_check.json
                wee_alloc-e24e3f3e55a205fe
                    build-script-build-script-build.json
        release
            .fingerprint
                Inflector-971d12571cd74ccc
                    lib-inflector.json
                autocfg-6c90b200fc23a9fc
                    lib-autocfg.json
                borsh-derive-dd622f9b282b0769
                    lib-borsh-derive.json
                borsh-derive-internal-de23273ba7fb2032
                    lib-borsh-derive-internal.json
                borsh-schema-derive-internal-5b061598c67a252e
                    lib-borsh-schema-derive-internal.json
                byteorder-7df47cfeb4932ccb
                    build-script-build-script-build.json
                convert_case-0b0e2598baee41bb
                    lib-convert_case.json
                derive_more-f14f429f7df56c3d
                    lib-derive_more.json
                generic-array-ff847ced35daa5ac
                    build-script-build-script-build.json
                hashbrown-1331270c5cb619a7
                    run-build-script-build-script-build.json
                hashbrown-56c096e6265afdec
                    build-script-build-script-build.json
                hashbrown-786da5887c47dddf
                    lib-hashbrown.json
                indexmap-37915a07ad376331
                    run-build-script-build-script-build.json
                indexmap-38fc82d153d2ce3b
                    lib-indexmap.json
                indexmap-eb9a185c88da4a36
                    build-script-build-script-build.json
                itoa-b4085ecfc311edf9
                    lib-itoa.json
                memchr-ed355b9280ab2042
                    build-script-build-script-build.json
                near-rpc-error-core-ca165ed9b31a5a3e
                    lib-near-rpc-error-core.json
                near-rpc-error-macro-c3cf6d58e7b4594e
                    lib-near-rpc-error-macro.json
                near-sdk-core-41bef0775b141b0e
                    lib-near-sdk-core.json
                near-sdk-macros-8d6b45d6d89e14b7
                    lib-near-sdk-macros.json
                num-bigint-e6debb391fc94216
                    build-script-build-script-build.json
                num-integer-619179dc329c0b50
                    build-script-build-script-build.json
                num-rational-e77899a5dc776f71
                    build-script-build-script-build.json
                num-traits-8eac38bb77017341
                    build-script-build-script-build.json
                proc-macro-crate-99af7a02f87e7c37
                    lib-proc-macro-crate.json
                proc-macro2-3e000e516e10a5db
                    lib-proc-macro2.json
                proc-macro2-c05ad936e37638dd
                    build-script-build-script-build.json
                proc-macro2-d324b639bd36dd22
                    run-build-script-build-script-build.json
                quote-e8b3d3ee2b2a468c
                    lib-quote.json
                ryu-0b9c3d175bc20f19
                    build-script-build-script-build.json
                ryu-40efe35c938286b6
                    run-build-script-build-script-build.json
                ryu-5e71ea23f4463188
                    lib-ryu.json
                serde-878518af6ec69d23
                    run-build-script-build-script-build.json
                serde-aebce9d0b211a288
                    lib-serde.json
                serde-cdcb260ace74b1a9
                    build-script-build-script-build.json
                serde_derive-166f7eceabe345fa
                    lib-serde_derive.json
                serde_derive-209d7b975b72075c
                    run-build-script-build-script-build.json
                serde_derive-7fd709e497b8dca0
                    build-script-build-script-build.json
                serde_json-087891b2d492085f
                    lib-serde_json.json
                serde_json-b564d827ba6eefed
                    build-script-build-script-build.json
                serde_json-de693e9034ab1a9e
                    run-build-script-build-script-build.json
                syn-2e7b6d98ae7148f3
                    build-script-build-script-build.json
                syn-36c575ee6bdee5d8
                    run-build-script-build-script-build.json
                syn-6bd3d4cc0039bc9d
                    lib-syn.json
                toml-3058adb7e121ae03
                    lib-toml.json
                typenum-32c4bab48277300b
                    build-script-build-script-main.json
                unicode-xid-9973c4f77c270d9c
                    lib-unicode-xid.json
                version_check-2f8f6d186475fac7
                    lib-version_check.json
                wee_alloc-b0ada70db02a195c
                    build-script-build-script-build.json
        wasm32-unknown-unknown
            debug
                .fingerprint
                    ahash-612946e4a705c957
                        lib-ahash.json
                    aho-corasick-8d2aa056d0c5ed4e
                        lib-aho_corasick.json
                    base64-cf025b5209cb2d0b
                        lib-base64.json
                    block-buffer-4bded05429b809b7
                        lib-block-buffer.json
                    block-buffer-b1d0627a5d94608c
                        lib-block-buffer.json
                    block-padding-7b2bce12c0a16fc2
                        lib-block-padding.json
                    borsh-d9f6961a11ba8949
                        lib-borsh.json
                    bs58-e88674807796dbe2
                        lib-bs58.json
                    byte-tools-7f51d59596b144f0
                        lib-byte-tools.json
                    byteorder-25b42b86990d6e9e
                        lib-byteorder.json
                    byteorder-2ea8c8d15201dbe9
                        run-build-script-build-script-build.json
                    cfg-if-b1cf6720ef6e429e
                        lib-cfg-if.json
                    cfg-if-fbbf0c3f7446caa3
                        lib-cfg-if.json
                    digest-b3d22e244b26ae4b
                        lib-digest.json
                    digest-c2b970ee82c2766b
                        lib-digest.json
                    generic-array-0013ddbf3705f5e8
                        lib-generic_array.json
                    generic-array-14725602e612fc92
                        lib-generic_array.json
                    generic-array-c52ee7585bf80077
                        run-build-script-build-script-build.json
                    greeter-98ace302c5fafa12
                        lib-greeter.json
                    hashbrown-3d9774000b24314a
                        lib-hashbrown.json
                    hashbrown-ead79d8c4e3cfdb6
                        run-build-script-build-script-build.json
                    hashbrown-f1b2fc1acdd979a8
                        lib-hashbrown.json
                    hex-aa6f119bb7cef037
                        lib-hex.json
                    indexmap-2b9fdfb0590db8ce
                        lib-indexmap.json
                    indexmap-92c77bbe3c53869b
                        run-build-script-build-script-build.json
                    itoa-f2dcdd15c069cfbf
                        lib-itoa.json
                    keccak-7f6c060605a15b71
                        lib-keccak.json
                    lazy_static-ba9430838c81ba7b
                        lib-lazy_static.json
                    memchr-2a91fec19f7c81d7
                        run-build-script-build-script-build.json
                    memchr-bcb0550f2dea2f4d
                        lib-memchr.json
                    memory_units-e5187fe04e81451b
                        lib-memory_units.json
                    near-primitives-core-c8f928056eafa8e2
                        lib-near-primitives-core.json
                    near-runtime-utils-f702ee4ffda2a82a
                        lib-near-runtime-utils.json
                    near-sdk-ec0bd81dd0fccfc4
                        lib-near-sdk.json
                    near-vm-errors-9f041a1b91cb2aa5
                        lib-near-vm-errors.json
                    near-vm-logic-a358c1aa14d02ee9
                        lib-near-vm-logic.json
                    num-bigint-11831ee67f264ebc
                        run-build-script-build-script-build.json
                    num-bigint-d1d7787064642cc5
                        lib-num-bigint.json
                    num-integer-a63ab742df9986f5
                        lib-num-integer.json
                    num-integer-bd7de2d2e9d87cc2
                        run-build-script-build-script-build.json
                    num-rational-e830f3c5920260cc
                        run-build-script-build-script-build.json
                    num-rational-fb2bfa7a7416b383
                        lib-num-rational.json
                    num-traits-0ad3b298da797243
                        lib-num-traits.json
                    num-traits-d6beb2ca4d55107c
                        run-build-script-build-script-build.json
                    opaque-debug-af2f926b7222bc39
                        lib-opaque-debug.json
                    opaque-debug-d34cbce1623f1a5f
                        lib-opaque-debug.json
                    regex-a2da315afc9140be
                        lib-regex.json
                    regex-syntax-0031869bd5c4f7a5
                        lib-regex-syntax.json
                    ryu-5bb7f55c9b9fa198
                        lib-ryu.json
                    ryu-d8152e1e1adf5a90
                        run-build-script-build-script-build.json
                    serde-8c43f8d5072e3763
                        run-build-script-build-script-build.json
                    serde-970d35b57ce242d2
                        lib-serde.json
                    serde_json-1f4b0ef86fe74ed0
                        run-build-script-build-script-build.json
                    serde_json-380a991f2ec0f5b7
                        lib-serde_json.json
                    sha2-8a0bbd10f702e140
                        lib-sha2.json
                    sha3-8ec6108662b48525
                        lib-sha3.json
                    typenum-30fd908905b7508c
                        run-build-script-build-script-main.json
                    typenum-47add8917f46666a
                        lib-typenum.json
                    wee_alloc-01c61f61c5ad8231
                        lib-wee_alloc.json
                    wee_alloc-6533575ddc004432
                        run-build-script-build-script-build.json
                build
                    num-bigint-11831ee67f264ebc
                        out
                            radix_bases.rs
                    typenum-30fd908905b7508c
                        out
                            consts.rs
                            op.rs
                            tests.rs
                    wee_alloc-6533575ddc004432
                        out
                            wee_alloc_static_array_backend_size_bytes.txt
            release
                .fingerprint
                    ahash-1ff91d44a43d7f75
                        lib-ahash.json
                    aho-corasick-f11a03410faecbf6
                        lib-aho_corasick.json
                    base64-21664f36015e21f0
                        lib-base64.json
                    block-buffer-50faabb797e48e8a
                        lib-block-buffer.json
                    block-buffer-97d423858901d24c
                        lib-block-buffer.json
                    block-padding-2d789381e00611f4
                        lib-block-padding.json
                    borsh-d020ecd12b459daa
                        lib-borsh.json
                    bs58-749dd7ed550ad75f
                        lib-bs58.json
                    byte-tools-05804b47334692cd
                        lib-byte-tools.json
                    byteorder-85e8667836c28a8d
                        run-build-script-build-script-build.json
                    byteorder-edd123b6856808d1
                        lib-byteorder.json
                    cfg-if-3f548c3b3a8613a1
                        lib-cfg-if.json
                    cfg-if-e13b599e1580433b
                        lib-cfg-if.json
                    digest-21127efb99aa1d39
                        lib-digest.json
                    digest-384cad7eeed48bba
                        lib-digest.json
                    generic-array-4763a2c796feb8d9
                        lib-generic_array.json
                    generic-array-820b295fae9fbb44
                        run-build-script-build-script-build.json
                    generic-array-ed00dd64539dc42b
                        lib-generic_array.json
                    greeter-98ace302c5fafa12
                        lib-greeter.json
                    hashbrown-385bf8b0f7c4c038
                        lib-hashbrown.json
                    hashbrown-4e157b87ad0046b8
                        lib-hashbrown.json
                    hashbrown-959490edc8c96893
                        run-build-script-build-script-build.json
                    hex-54f8cfcb821fddf5
                        lib-hex.json
                    indexmap-1b3c2534c9d944d4
                        run-build-script-build-script-build.json
                    indexmap-d8a7f0a9f688624d
                        lib-indexmap.json
                    itoa-a93a621f1a399e74
                        lib-itoa.json
                    keccak-34c96866ecf1ac67
                        lib-keccak.json
                    lazy_static-27a6f23ae3f80174
                        lib-lazy_static.json
                    memchr-3074bb45b4cda370
                        run-build-script-build-script-build.json
                    memchr-c307ab9b5924dec1
                        lib-memchr.json
                    memory_units-9fc5376dafbdf7bb
                        lib-memory_units.json
                    near-primitives-core-8135a9e9ca2c6776
                        lib-near-primitives-core.json
                    near-runtime-utils-bbf2b8a16bbc80b2
                        lib-near-runtime-utils.json
                    near-sdk-24c30a2a1e1c1648
                        lib-near-sdk.json
                    near-vm-errors-10bf7cbd817a83d6
                        lib-near-vm-errors.json
                    near-vm-logic-8354b17fb39a7b1a
                        lib-near-vm-logic.json
                    num-bigint-2f9fca567c356851
                        lib-num-bigint.json
                    num-bigint-44d75eb8e8ac0c09
                        run-build-script-build-script-build.json
                    num-integer-cb3f0d9a8c39cd6b
                        lib-num-integer.json
                    num-integer-fd2b0de5f3c4233f
                        run-build-script-build-script-build.json
                    num-rational-08a2c0bf3208b1d2
                        run-build-script-build-script-build.json
                    num-rational-fab72aae72d688c2
                        lib-num-rational.json
                    num-traits-5ca7fd70d19e2a27
                        lib-num-traits.json
                    num-traits-a74b0448982ca6dd
                        run-build-script-build-script-build.json
                    opaque-debug-afd69d12090964c4
                        lib-opaque-debug.json
                    opaque-debug-bbd4a25179605534
                        lib-opaque-debug.json
                    regex-a36e3bd3eb0957e3
                        lib-regex.json
                    regex-syntax-ccc2f080bb9c2e6f
                        lib-regex-syntax.json
                    ryu-777ad4717f0f7df0
                        lib-ryu.json
                    ryu-bf1be415105ea5cf
                        run-build-script-build-script-build.json
                    serde-2a76f0dc07cd97f7
                        lib-serde.json
                    serde-fceeb30e8b3ca4bd
                        run-build-script-build-script-build.json
                    serde_json-16d522284be3ff0e
                        lib-serde_json.json
                    serde_json-d926fba75d425a8f
                        run-build-script-build-script-build.json
                    sha2-009b80ca03fcaaf9
                        lib-sha2.json
                    sha3-3c89001fed259ad9
                        lib-sha3.json
                    typenum-034e826346a0e35c
                        run-build-script-build-script-main.json
                    typenum-8c8860325d5ce5a8
                        lib-typenum.json
                    wee_alloc-0a3b231e1e35b654
                        lib-wee_alloc.json
                    wee_alloc-b6a34cf62f4bcb70
                        run-build-script-build-script-build.json
                build
                    num-bigint-44d75eb8e8ac0c09
                        out
                            radix_bases.rs
                    typenum-034e826346a0e35c
                        out
                            consts.rs
                            op.rs
                            tests.rs
                    wee_alloc-b6a34cf62f4bcb70
                        out
                            wee_alloc_static_array_backend_size_bytes.txt
package.json
src
    App.js
    __mocks__
        fileMock.js
    app.css
    assets
        logo-black.svg
        logo-white.svg
    config.js
    global.css
    index.html
    index.js
    jest.init.js
    main.test.js
    utils.js
    wallet
        login
            index.html

holy-cube-amber Smart Contract
==================

A [smart contract] written in [Rust] for an app initialized with [create-near-app]

Quick Start
===========

Before you compile this code, you will need to install Rust with [correct target]

Exploring The Code
==================

1. The main smart contract code lives in `src/lib.rs`. You can compile it with
   the `./compile` script.
2. Tests: You can run smart contract tests with the `./test` script. This runs
   standard Rust tests using [cargo] with a `--nocapture` flag so that you
   can see any debug info you print to the console.

  [smart contract]: https://docs.near.org/docs/develop/contracts/overview
  [Rust]: https://www.rust-lang.org/
  [create-near-app]: https://github.com/near/create-near-app
  [correct target]: https://github.com/near/near-sdk-rs#pre-requisites
  [cargo]: https://doc.rust-lang.org/book/ch01-03-hello-cargo.html
holy-cube-amber
==================

This [React] app was initialized with [create-near-app]

Quick Start
===========

To run this project locally:

1. Prerequisites: Make sure you've installed [Node.js] ≥ 12
2. Install dependencies: `yarn install`
3. Run the local development server: `yarn dev` (see `package.json` for a
   full list of `scripts` you can run with `yarn`)

Now you'll have a local development environment backed by the NEAR TestNet!

Go ahead and play with the app and the code. As you make code changes, the app will automatically reload.

Exploring The Code
==================

1. The "backend" code lives in the `/contract` folder. See the README there for
   more info.
2. The frontend code lives in the `/src` folder. `/src/index.html` is a great
   place to start exploring. Note that it loads in `/src/index.js`, where you
   can learn how the frontend connects to the NEAR blockchain.
3. Tests: there are different kinds of tests for the frontend and the smart
   contract. See `contract/README` for info about how it's tested. The frontend
   code gets tested with [jest]. You can run both of these at once with `yarn
   run test`.

Deploy
======

Every smart contract in NEAR has its [own associated account][NEAR accounts]. When you run `yarn dev`, your smart contract gets deployed to the live NEAR TestNet with a throwaway account. When you're ready to make it permanent, here's how.

Step 0: Install near-cli (optional)
-------------------------------------

[near-cli] is a command line interface (CLI) for interacting with the NEAR blockchain. It was installed to the local `node_modules` folder when you ran `yarn install`, but for best ergonomics you may want to install it globally:

    yarn install --global near-cli

Or, if you'd rather use the locally-installed version, you can prefix all `near` commands with `npx`

Ensure that it's installed with `near --version` (or `npx near --version`)

Step 1: Create an account for the contract
------------------------------------------

Each account on NEAR can have at most one contract deployed to it. If you've already created an account such as `your-name.testnet`, you can deploy your contract to `holy-cube-amber.your-name.testnet`. Assuming you've already created an account on [NEAR Wallet], here's how to create `holy-cube-amber.your-name.testnet`:

1. Authorize NEAR CLI, following the commands it gives you:

      near login

2. Create a subaccount (replace `YOUR-NAME` below with your actual account name):

      near create-account holy-cube-amber.YOUR-NAME.testnet --masterAccount YOUR-NAME.testnet

Step 2: set contract name in code
---------------------------------

Modify the line in `src/config.js` that sets the account name of the contract. Set it to the account id you used above.

    const CONTRACT_NAME = process.env.CONTRACT_NAME || 'holy-cube-amber.YOUR-NAME.testnet'

Step 3: deploy!
---------------

One command:

    yarn deploy

As you can see in `package.json`, this does two things:

1. builds & deploys smart contract to NEAR TestNet
2. builds & deploys frontend code to GitHub using [gh-pages]. This will only work if the project already has a repository set up on GitHub. Feel free to modify the `deploy` script in `package.json` to deploy elsewhere.

Troubleshooting
===============

On Windows, if you're seeing an error containing `EPERM` it may be related to spaces in your path. Please see [this issue](https://github.com/zkat/npx/issues/209) for more details.

  [React]: https://reactjs.org/
  [create-near-app]: https://github.com/near/create-near-app
  [Node.js]: https://nodejs.org/en/download/package-manager/
  [jest]: https://jestjs.io/
  [NEAR accounts]: https://docs.near.org/docs/concepts/account
  [NEAR Wallet]: https://wallet.testnet.near.org/
  [near-cli]: https://github.com/near/near-cli
  [gh-pages]: https://github.com/tschaub/gh-pages
holy-cube-amber Smart Contract
==================

A [smart contract] written in [Rust] for an app initialized with [create-near-app]

Quick Start
===========

Before you compile this code, you will need to install Rust with [correct target]

Exploring The Code
==================

1. The main smart contract code lives in `src/lib.rs`. You can compile it with
   the `./compile` script.
2. Tests: You can run smart contract tests with the `./test` script. This runs
   standard Rust tests using [cargo] with a `--nocapture` flag so that you
   can see any debug info you print to the console.

  [smart contract]: https://docs.near.org/docs/develop/contracts/overview
  [Rust]: https://www.rust-lang.org/
  [create-near-app]: https://github.com/near/create-near-app
  [correct target]: https://github.com/near/near-sdk-rs#pre-requisites
  [cargo]: https://doc.rust-lang.org/book/ch01-03-hello-cargo.html
holy-cube-amber
==================

This [React] app was initialized with [create-near-app]

Quick Start
===========

To run this project locally:

1. Prerequisites: Make sure you've installed [Node.js] ≥ 12
2. Install dependencies: `yarn install`
3. Run the local development server: `yarn dev` (see `package.json` for a
   full list of `scripts` you can run with `yarn`)

Now you'll have a local development environment backed by the NEAR TestNet!

Go ahead and play with the app and the code. As you make code changes, the app will automatically reload.

Exploring The Code
==================

1. The "backend" code lives in the `/contract` folder. See the README there for
   more info.
2. The frontend code lives in the `/src` folder. `/src/index.html` is a great
   place to start exploring. Note that it loads in `/src/index.js`, where you
   can learn how the frontend connects to the NEAR blockchain.
3. Tests: there are different kinds of tests for the frontend and the smart
   contract. See `contract/README` for info about how it's tested. The frontend
   code gets tested with [jest]. You can run both of these at once with `yarn
   run test`.

Deploy
======

Every smart contract in NEAR has its [own associated account][NEAR accounts]. When you run `yarn dev`, your smart contract gets deployed to the live NEAR TestNet with a throwaway account. When you're ready to make it permanent, here's how.

Step 0: Install near-cli (optional)
-------------------------------------

[near-cli] is a command line interface (CLI) for interacting with the NEAR blockchain. It was installed to the local `node_modules` folder when you ran `yarn install`, but for best ergonomics you may want to install it globally:

    yarn install --global near-cli

Or, if you'd rather use the locally-installed version, you can prefix all `near` commands with `npx`

Ensure that it's installed with `near --version` (or `npx near --version`)

Step 1: Create an account for the contract
------------------------------------------

Each account on NEAR can have at most one contract deployed to it. If you've already created an account such as `your-name.testnet`, you can deploy your contract to `holy-cube-amber.your-name.testnet`. Assuming you've already created an account on [NEAR Wallet], here's how to create `holy-cube-amber.your-name.testnet`:

1. Authorize NEAR CLI, following the commands it gives you:

      near login

2. Create a subaccount (replace `YOUR-NAME` below with your actual account name):

      near create-account holy-cube-amber.YOUR-NAME.testnet --masterAccount YOUR-NAME.testnet

Step 2: set contract name in code
---------------------------------

Modify the line in `src/config.js` that sets the account name of the contract. Set it to the account id you used above.

    const CONTRACT_NAME = process.env.CONTRACT_NAME || 'holy-cube-amber.YOUR-NAME.testnet'

Step 3: deploy!
---------------

One command:

    yarn deploy

As you can see in `package.json`, this does two things:

1. builds & deploys smart contract to NEAR TestNet
2. builds & deploys frontend code to GitHub using [gh-pages]. This will only work if the project already has a repository set up on GitHub. Feel free to modify the `deploy` script in `package.json` to deploy elsewhere.

Troubleshooting
===============

On Windows, if you're seeing an error containing `EPERM` it may be related to spaces in your path. Please see [this issue](https://github.com/zkat/npx/issues/209) for more details.

  [React]: https://reactjs.org/
  [create-near-app]: https://github.com/near/create-near-app
  [Node.js]: https://nodejs.org/en/download/package-manager/
  [jest]: https://jestjs.io/
  [NEAR accounts]: https://docs.near.org/docs/concepts/account
  [NEAR Wallet]: https://wallet.testnet.near.org/
  [near-cli]: https://github.com/near/near-cli
  [gh-pages]: https://github.com/tschaub/gh-pages
