.gitpod.yml
README.md
contract
    Cargo.toml
    README.md
    neardev
        dev-account.env
    src
        lib.rs
    target
        .rustc_info.json
        debug
            .fingerprint
                Inflector-ee02651c6f7bcfa9
                    lib-inflector.json
                ahash-4743d90eb3a9514b
                    lib-ahash.json
                ahash-acb17f1a4928bc2d
                    build-script-build-script-build.json
                ahash-dfca55b834093316
                    run-build-script-build-script-build.json
                arrayref-4dc097dfb0b7bc98
                    lib-arrayref.json
                arrayvec-8b60c119bed40a3e
                    lib-arrayvec.json
                arrayvec-cdcfe64e6c3feccb
                    lib-arrayvec.json
                autocfg-fcea4b88ecedf39f
                    lib-autocfg.json
                base64-ca1684889064ca4a
                    lib-base64.json
                base64-d92a41ccbebf8d36
                    lib-base64.json
                bitvec-33e12ba849699fdf
                    lib-bitvec.json
                blake2-86b3c2778c356e5d
                    lib-blake2.json
                block-buffer-7a57807b0ffb8b4f
                    lib-block-buffer.json
                block-buffer-d5adaa9f3c7d92ad
                    lib-block-buffer.json
                borsh-17bcbb1495c5cc04
                    lib-borsh.json
                borsh-derive-01a505a64569e80b
                    lib-borsh-derive.json
                borsh-derive-internal-127779fd8e899902
                    lib-borsh-derive-internal.json
                borsh-schema-derive-internal-b95a1a154cf74b81
                    lib-borsh-schema-derive-internal.json
                bs58-a4bdb5d5fd3a91fa
                    lib-bs58.json
                byte-slice-cast-34e9b46690f8be01
                    lib-byte-slice-cast.json
                byteorder-450fd0ab6cf63ef9
                    lib-byteorder.json
                bytesize-fab590761bd521db
                    lib-bytesize.json
                c2-chacha-8678bdc35df475cb
                    lib-c2-chacha.json
                cc-7d370d7d91f4fdcd
                    lib-cc.json
                cfg-if-2416aea0125680e1
                    lib-cfg-if.json
                cfg-if-e6fce2b47f1e3a40
                    lib-cfg-if.json
                chrono-b3e5ccde844c2a33
                    lib-chrono.json
                cipher-d16f5ecdd92e4c45
                    lib-cipher.json
                convert_case-8cf5df44c07ff0f9
                    lib-convert_case.json
                core-foundation-e1bbbf1a04b49c89
                    lib-core-foundation.json
                core-foundation-sys-9ba72a6ae171dd19
                    run-build-script-build-script-build.json
                core-foundation-sys-b6004186fe7b56f7
                    lib-core-foundation-sys.json
                core-foundation-sys-dbd7668eb10d1727
                    build-script-build-script-build.json
                cpufeatures-40a5d1de464d9053
                    lib-cpufeatures.json
                crunchy-1cc7255f8217e2bb
                    lib-crunchy.json
                crunchy-2d2e62f2736c0a61
                    run-build-script-build-script-build.json
                crunchy-c28a7f51b940c821
                    build-script-build-script-build.json
                crypto-common-6ee7dee3356ef700
                    lib-crypto-common.json
                crypto-mac-548dc895f0add32b
                    lib-crypto-mac.json
                curve25519-dalek-eca4157dd830057b
                    lib-curve25519-dalek.json
                derive_more-f42bd2af951cc3d6
                    lib-derive_more.json
                digest-8c7f48790bbe34c9
                    lib-digest.json
                digest-ef6d0f7863500a00
                    lib-digest.json
                easy-ext-47eae31476894294
                    lib-easy-ext.json
                ed25519-dalek-98256213fce96808
                    lib-ed25519-dalek.json
                ed25519-dde1606e71469ba4
                    lib-ed25519.json
                fixed-hash-0b30e5f61bdd83ac
                    lib-fixed-hash.json
                funty-abd51f1efad3638a
                    lib-funty.json
                generic-array-12629f4712ece13d
                    build-script-build-script-build.json
                generic-array-61e8cd459a9b6890
                    lib-generic_array.json
                generic-array-e4011815d4de4cbe
                    run-build-script-build-script-build.json
                getrandom-387279d79849abeb
                    lib-getrandom.json
                getrandom-396046ada52e16f3
                    build-script-build-script-build.json
                getrandom-ca89f512ae684237
                    lib-getrandom.json
                getrandom-e9d44f2e33221c36
                    run-build-script-build-script-build.json
                hashbrown-39167973f8b650d6
                    lib-hashbrown.json
                heck-ce7c7c1c3c4fa4c7
                    lib-heck.json
                hello_near-00ca379cccdf6430
                    lib-hello_near.json
                hello_near-5c132547880fff71
                    test-lib-hello_near.json
                hex-9a4ba69305c1736f
                    lib-hex.json
                iana-time-zone-7642297f9bd8e159
                    lib-iana-time-zone.json
                impl-codec-69c0990b555a3fae
                    lib-impl-codec.json
                impl-trait-for-tuples-3c14b346765dd6d7
                    lib-impl-trait-for-tuples.json
                itoa-4f834622d3b043ae
                    lib-itoa.json
                keccak-29ada344f0a5969e
                    lib-keccak.json
                libc-12b0441a18740911
                    build-script-build-script-build.json
                libc-90be5842bb78b50a
                    run-build-script-build-script-build.json
                libc-dad42622283a9fdd
                    lib-libc.json
                memory_units-a5d1e04eb22417a6
                    lib-memory_units.json
                near-account-id-99d7802edc50a598
                    lib-near-account-id.json
                near-crypto-f5b1bc744e262c1e
                    lib-near-crypto.json
                near-primitives-0bb0ba3923f54830
                    lib-near-primitives.json
                near-primitives-core-189b085e432385cc
                    lib-near-primitives-core.json
                near-rpc-error-core-d54ebf8203842fee
                    lib-near-rpc-error-core.json
                near-rpc-error-macro-7791b52650263436
                    lib-near-rpc-error-macro.json
                near-sdk-72a0aeb029ee63e7
                    lib-near-sdk.json
                near-sdk-macros-ac83132011fc1738
                    lib-near-sdk-macros.json
                near-sys-808883cb4e449f76
                    lib-near-sys.json
                near-vm-errors-bb8c79a7f88257bb
                    lib-near-vm-errors.json
                near-vm-logic-502cf1f08580ce1f
                    lib-near-vm-logic.json
                num-bigint-97627202e8e2b338
                    lib-num-bigint.json
                num-bigint-c918f13ecf602703
                    build-script-build-script-build.json
                num-bigint-d6f1a02feee433d9
                    run-build-script-build-script-build.json
                num-integer-299b22416364b8f8
                    build-script-build-script-build.json
                num-integer-460011ae16f254fc
                    run-build-script-build-script-build.json
                num-integer-9b942ee47e7686cf
                    lib-num-integer.json
                num-rational-5767449b671c7e15
                    run-build-script-build-script-build.json
                num-rational-d51a0f5f102e330a
                    build-script-build-script-build.json
                num-rational-e7f4f190ee68912c
                    lib-num-rational.json
                num-traits-a976f8e93782608e
                    lib-num-traits.json
                num-traits-e7667cf8d5ddcd1b
                    build-script-build-script-build.json
                num-traits-fd837251088ace0a
                    run-build-script-build-script-build.json
                once_cell-e8c0717eb4e6ad80
                    lib-once_cell.json
                opaque-debug-69c7d9cb8c90c998
                    lib-opaque-debug.json
                parity-scale-codec-derive-46c30de26d9742f3
                    lib-parity-scale-codec-derive.json
                parity-scale-codec-eb65fc1abc818ef5
                    lib-parity-scale-codec.json
                parity-secp256k1-06dd73715ef9fcbb
                    lib-secp256k1.json
                parity-secp256k1-349e4dc23eacc28d
                    run-build-script-build-script-build.json
                parity-secp256k1-c5a84f9121b7ee80
                    build-script-build-script-build.json
                ppv-lite86-9dcf5b97849a38f6
                    lib-ppv-lite86.json
                primitive-types-519414a49bc88152
                    lib-primitive-types.json
                proc-macro-crate-2a21090dbcdca973
                    lib-proc-macro-crate.json
                proc-macro-crate-ce3b86bf47361a9d
                    lib-proc-macro-crate.json
                proc-macro2-56fe3ba31296bd10
                    lib-proc-macro2.json
                proc-macro2-8a7317f6c8b1fb0b
                    run-build-script-build-script-build.json
                proc-macro2-eae8f55364a1f65c
                    build-script-build-script-build.json
                quote-09b104d066f91afa
                    build-script-build-script-build.json
                quote-2bf29a4346215c6c
                    run-build-script-build-script-build.json
                quote-586bddd075c058e6
                    lib-quote.json
                radium-0fbfc45ef04458d9
                    build-script-build-script-build.json
                radium-38be074bc4515a99
                    lib-radium.json
                radium-46e3fcd7ef1491dd
                    run-build-script-build-script-build.json
                rand-4317d3ff8e83d395
                    lib-rand.json
                rand-fbf7cc7601ad5220
                    lib-rand.json
                rand_chacha-6a0a1743ddb7135a
                    lib-rand_chacha.json
                rand_chacha-a056b2ed6c7494f0
                    lib-rand_chacha.json
                rand_core-17cdfe8b20129696
                    lib-rand_core.json
                rand_core-4b49e18a22920d9e
                    lib-rand_core.json
                reed-solomon-erasure-6481759c75cc8aee
                    lib-reed-solomon-erasure.json
                reed-solomon-erasure-7613c8df48cd12ab
                    run-build-script-build-script-build.json
                reed-solomon-erasure-beb572cf789e718d
                    build-script-build-script-build.json
                ripemd-98e1fafaecb9287d
                    lib-ripemd.json
                rustc-hex-71e4043f6a184cc4
                    lib-rustc-hex.json
                rustversion-02d0e43a70a5d587
                    lib-rustversion.json
                rustversion-1909012182aaccab
                    run-build-script-build-script-build.json
                rustversion-9e2134889f5872f7
                    build-script-build-script-build.json
                ryu-3296d14dc9fd089f
                    lib-ryu.json
                serde-1610c2ecbd006cdf
                    lib-serde.json
                serde-23a927d5661d4e53
                    lib-serde.json
                serde-6de38008e63d820c
                    run-build-script-build-script-build.json
                serde-6ee9927458ff8666
                    build-script-build-script-build.json
                serde-b3bdc83de06106f7
                    run-build-script-build-script-build.json
                serde-edd2b0e13cde507c
                    build-script-build-script-build.json
                serde_derive-1f5ff2ebf7a9834b
                    run-build-script-build-script-build.json
                serde_derive-a4172d88f41e91b8
                    lib-serde_derive.json
                serde_derive-f5f3b11529fa44c3
                    build-script-build-script-build.json
                serde_json-353821164d99b020
                    build-script-build-script-build.json
                serde_json-df30b3c9fd5acbfc
                    lib-serde_json.json
                serde_json-f9dc2312313ae752
                    run-build-script-build-script-build.json
                sha2-6068e95102dfdb90
                    lib-sha2.json
                sha2-ea998426e835b1ed
                    lib-sha2.json
                sha3-b566963241a21d94
                    lib-sha3.json
                signature-ac7d80a47eb77b63
                    lib-signature.json
                smallvec-e992d0c40b842ca9
                    lib-smallvec.json
                smart-default-4bf8ce9dd2d899df
                    lib-smart-default.json
                static_assertions-3b0d19dde3bac27b
                    lib-static_assertions.json
                strum-c7c45693f622d054
                    lib-strum.json
                strum_macros-724a8d0e72d6a387
                    lib-strum_macros.json
                subtle-abb77193901dac18
                    lib-subtle.json
                syn-11a5da0f0b48f589
                    run-build-script-build-script-build.json
                syn-1770a71b91b91781
                    build-script-build-script-build.json
                syn-edf657f205172511
                    lib-syn.json
                synstructure-c18868944e9c722f
                    lib-synstructure.json
                tap-9c7870527c51d6f6
                    lib-tap.json
                thiserror-9bf10f440f4a5271
                    lib-thiserror.json
                thiserror-impl-33ca139d6769aa2d
                    lib-thiserror-impl.json
                time-869424910205dbc7
                    lib-time.json
                toml-22e87e367b917f0f
                    lib-toml.json
                typenum-1154b46cc06d14e6
                    lib-typenum.json
                typenum-54915f3ebe6f51a3
                    build-script-build-script-main.json
                typenum-752424536c07b4b3
                    run-build-script-build-script-main.json
                uint-75033e57001ae07f
                    lib-uint.json
                unicode-ident-3b487932e8754b8f
                    lib-unicode-ident.json
                unicode-xid-112315c40cd038ef
                    lib-unicode-xid.json
                version_check-f2976251c744213b
                    lib-version_check.json
                wee_alloc-70a35408d6872e30
                    run-build-script-build-script-build.json
                wee_alloc-a3280de5f10d3683
                    build-script-build-script-build.json
                wee_alloc-e673187745cb8f52
                    lib-wee_alloc.json
                wyz-1328c0857e28e219
                    lib-wyz.json
                zeroize-b5638485fa02a50f
                    lib-zeroize.json
                zeroize_derive-048dde91e0916a48
                    lib-zeroize_derive.json
            build
                crunchy-2d2e62f2736c0a61
                    out
                        lib.rs
                num-bigint-d6f1a02feee433d9
                    out
                        radix_bases.rs
                parity-secp256k1-349e4dc23eacc28d
                    out
                        flag_check.c
                reed-solomon-erasure-7613c8df48cd12ab
                    out
                        table.rs
                typenum-752424536c07b4b3
                    out
                        consts.rs
                        op.rs
                        tests.rs
                wee_alloc-70a35408d6872e30
                    out
                        wee_alloc_static_array_backend_size_bytes.txt
        release
            .fingerprint
                Inflector-3b3f221d3a038f12
                    lib-inflector.json
                ahash-bc436404cd2c70d8
                    build-script-build-script-build.json
                borsh-derive-7e262ea85b775850
                    lib-borsh-derive.json
                borsh-derive-internal-7b64409401a93490
                    lib-borsh-derive-internal.json
                borsh-schema-derive-internal-9ac54511f11493e1
                    lib-borsh-schema-derive-internal.json
                crunchy-7e25834727137908
                    build-script-build-script-build.json
                near-sdk-macros-16ac5feaa11137f8
                    lib-near-sdk-macros.json
                proc-macro-crate-66ae6fc76694e145
                    lib-proc-macro-crate.json
                proc-macro2-275dd03cc13169db
                    lib-proc-macro2.json
                proc-macro2-28bdb56840048eee
                    run-build-script-build-script-build.json
                proc-macro2-9cc26b171cd3b55b
                    build-script-build-script-build.json
                quote-1a6a108f0f3f4cbc
                    build-script-build-script-build.json
                quote-5fd2d47623ffad79
                    lib-quote.json
                quote-d5b743d8f7eb7d18
                    run-build-script-build-script-build.json
                serde-2b4acd0e2f64ad19
                    build-script-build-script-build.json
                serde-58708cdca152d7ff
                    build-script-build-script-build.json
                serde-df77a694907321bf
                    lib-serde.json
                serde-f11e88f625e90098
                    run-build-script-build-script-build.json
                serde_derive-21892e83fa501686
                    run-build-script-build-script-build.json
                serde_derive-a951fea180f8309a
                    lib-serde_derive.json
                serde_derive-d2a81a532fdc45ed
                    build-script-build-script-build.json
                serde_json-128b1ac8cb6ace86
                    build-script-build-script-build.json
                syn-5916c55475f47d31
                    run-build-script-build-script-build.json
                syn-8008a4a04745d62c
                    lib-syn.json
                syn-aa5be3ca0b635863
                    build-script-build-script-build.json
                toml-5da971da5f0ff0e6
                    lib-toml.json
                unicode-ident-0420738d25d61a58
                    lib-unicode-ident.json
                version_check-cadad5a805ab2e5c
                    lib-version_check.json
                wee_alloc-bf9ac153516e840b
                    build-script-build-script-build.json
        wasm32-unknown-unknown
            release
                .fingerprint
                    ahash-0dea1d9e668adb10
                        lib-ahash.json
                    ahash-400e08c71a720aa2
                        run-build-script-build-script-build.json
                    base64-4f591523dd1f0bf4
                        lib-base64.json
                    borsh-19e911e108298ba8
                        lib-borsh.json
                    bs58-e91155471e38631a
                        lib-bs58.json
                    byteorder-8507242a83fc1d89
                        lib-byteorder.json
                    cfg-if-203ea24edc107eda
                        lib-cfg-if.json
                    crunchy-57ecfcb4a367c7ef
                        lib-crunchy.json
                    crunchy-8c01f4859e22fd3a
                        run-build-script-build-script-build.json
                    hashbrown-6a5153a55e19d604
                        lib-hashbrown.json
                    hello_near-00ca379cccdf6430
                        lib-hello_near.json
                    hex-58bd108e0efd4fb9
                        lib-hex.json
                    itoa-7c244649f66cce53
                        lib-itoa.json
                    memory_units-a1e2d037784e2d62
                        lib-memory_units.json
                    near-sdk-9347d8d4d4efbc32
                        lib-near-sdk.json
                    near-sys-1a5a64e21dd842a2
                        lib-near-sys.json
                    once_cell-6a687cb39dda1ae8
                        lib-once_cell.json
                    ryu-11b16468d0e56a5e
                        lib-ryu.json
                    serde-38d4d46cb4f1f45d
                        run-build-script-build-script-build.json
                    serde-77bf6fdbaf73f529
                        lib-serde.json
                    serde_json-31bc42e90f55b07e
                        run-build-script-build-script-build.json
                    serde_json-f2c9a3969da46273
                        lib-serde_json.json
                    static_assertions-68dd4bb8f6c3c3cf
                        lib-static_assertions.json
                    uint-8ea041e5fb480e82
                        lib-uint.json
                    wee_alloc-1dff4c58398a5c99
                        lib-wee_alloc.json
                    wee_alloc-7bd1dae7d8baadcf
                        run-build-script-build-script-build.json
                build
                    crunchy-8c01f4859e22fd3a
                        out
                            lib.rs
                    wee_alloc-7bd1dae7d8baadcf
                        out
                            wee_alloc_static_array_backend_size_bytes.txt
frontend
    .parcel-cache
        f6c2aacc42e8f766.txt
    App.js
    assets
        global.css
        logo-black.svg
        logo-white.svg
    dist
        index.bc0daea6.css
        index.html
        logo-black.4514ed42.svg
        logo-white.a7716062.svg
    index.html
    index.js
    near-api.js
    near-config.js
    package-lock.json
    package.json
    ui-components.js
integration-tests
    package-lock.json
    package.json
    src
        main.ava.ts
package-lock.json
package.json

Hello NEAR!
=================================

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`.
2. There are two functions to the smart contract: `get_greeting` and `set_greeting`.
3. Tests: You can run smart contract tests with the `cargo test`.

  [smart contract]: https://docs.near.org/develop/welcome
  [Rust]: https://www.rust-lang.org/
  [create-near-app]: https://github.com/near/create-near-app
  [correct target]: https://docs.near.org/develop/prerequisites#rust-and-wasm
  [cargo]: https://doc.rust-lang.org/book/ch01-03-hello-cargo.html
near-blank-project
==================

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

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

If you haven't installed dependencies during setup:

    npm run deps-install

Build and deploy your contract to TestNet with a temporary dev account:

    npm run deploy

Test your contract:

    npm test

If you have a frontend, run `npm start`. This will run a dev server.

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

1. The smart-contract code lives in the `/contract` folder. See the README there for
   more info. In blockchain apps the smart contract is the "backend" of your app.
2. The frontend code lives in the `/frontend` folder. `/frontend/index.html` is a great
   place to start exploring. Note that it loads in `/frontend/index.js`,
   this is your entrypoint to learn how the frontend connects to the NEAR blockchain.
3. Test your contract: `npm test`, this will run the tests in `integration-tests` directory.

Deploy
======

Every smart contract in NEAR has its [own associated account][NEAR accounts]. 
When you run `npm run deploy`, your smart contract gets deployed to the live NEAR TestNet with a temporary dev 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 `npm install`, but for best ergonomics you may want to install it globally:

    npm 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 `near-blank-project.your-name.testnet`. Assuming you've already created an account on [NEAR Wallet], here's how to create `near-blank-project.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 near-blank-project.YOUR-NAME.testnet --masterAccount YOUR-NAME.testnet

Step 2: deploy the contract
---------------------------

Use the CLI to deploy the contract to TestNet with your account ID.
Replace `PATH_TO_WASM_FILE` with the `wasm` that was generated in `contract` build directory.

    near deploy --accountId near-blank-project.YOUR-NAME.testnet --wasmFile PATH_TO_WASM_FILE

Step 3: set contract name in your frontend 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 || 'near-blank-project.YOUR-NAME.testnet'

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.

  [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/concepts/basics/account
  [NEAR Wallet]: https://wallet.testnet.near.org/
  [near-cli]: https://github.com/near/near-cli
  [gh-pages]: https://github.com/tschaub/gh-pages
