.gitpod.yml
README.md
babel.config.js
contract
    Cargo.toml
    README.md
    compile.js
    src
        lib.rs
    target
        .rustc_info.json
        debug
            .fingerprint
                Inflector-9e3c62115074b9cf
                    lib-inflector.json
                ahash-02b764e1919d7b94
                    build-script-build-script-build.json
                autocfg-cd255646c4ed3339
                    lib-autocfg.json
                borsh-derive-5ae16aa117c7f399
                    lib-borsh-derive.json
                borsh-derive-62ea774ce09e412e
                    lib-borsh-derive.json
                borsh-derive-internal-7c006f24651b4b31
                    lib-borsh-derive-internal.json
                borsh-derive-internal-d0a21fc13ecc1b98
                    lib-borsh-derive-internal.json
                borsh-schema-derive-internal-ab395ab8b11e5be3
                    lib-borsh-schema-derive-internal.json
                borsh-schema-derive-internal-e5157120bb37fb97
                    lib-borsh-schema-derive-internal.json
                byteorder-f262064c186a8c75
                    build-script-build-script-build.json
                convert_case-95e284bc56c12eb5
                    lib-convert_case.json
                derive_more-69cde6e327ff0a85
                    lib-derive_more.json
                generic-array-092d57466d24febe
                    build-script-build-script-build.json
                hashbrown-23b6f330e2a36dbb
                    run-build-script-build-script-build.json
                hashbrown-cdcf863ec2cdd3e4
                    build-script-build-script-build.json
                hashbrown-d487e72206b07264
                    lib-hashbrown.json
                indexmap-1e685d288818a816
                    lib-indexmap.json
                indexmap-8c9f9453652d0887
                    run-build-script-build-script-build.json
                indexmap-c3ac49ead90ef7d0
                    build-script-build-script-build.json
                itoa-b06d4cff304254a3
                    lib-itoa.json
                memchr-035c4269a6233099
                    build-script-build-script-build.json
                near-rpc-error-core-b63ef2006bff2a54
                    lib-near-rpc-error-core.json
                near-rpc-error-macro-379a6a754086af95
                    lib-near-rpc-error-macro.json
                near-sdk-core-f46d7222a619c60b
                    lib-near-sdk-core.json
                near-sdk-macros-31010ee0617c741a
                    lib-near-sdk-macros.json
                near-sdk-macros-67a465e716adb526
                    lib-near-sdk-macros.json
                near-sdk-macros-727405ec780c5e3a
                    lib-near-sdk-macros.json
                num-bigint-d69df36f763339d9
                    build-script-build-script-build.json
                num-integer-733a54d88eb397d7
                    build-script-build-script-build.json
                num-rational-ae7f1682837cfa6a
                    build-script-build-script-build.json
                num-traits-4b4399d154f5b10c
                    build-script-build-script-build.json
                proc-macro-crate-12334d71f27edc5f
                    lib-proc-macro-crate.json
                proc-macro-crate-205b93376dedf905
                    lib-proc-macro-crate.json
                proc-macro2-3fad645d9b421e8e
                    run-build-script-build-script-build.json
                proc-macro2-5fcfb2a46c5df79c
                    build-script-build-script-build.json
                proc-macro2-c9e8a8bd316f311f
                    lib-proc-macro2.json
                quote-577c40b40ecd60bd
                    lib-quote.json
                ryu-218129458e3751da
                    run-build-script-build-script-build.json
                ryu-a617547c15767d1a
                    build-script-build-script-build.json
                ryu-b54e014f019506d7
                    lib-ryu.json
                serde-0e75cf1f76ff67de
                    run-build-script-build-script-build.json
                serde-283b18786897374f
                    lib-serde.json
                serde-552ea552149e1a4d
                    build-script-build-script-build.json
                serde-60844c96808432f2
                    build-script-build-script-build.json
                serde-6c83abe875b32d7f
                    lib-serde.json
                serde-b99429f97a9b8ecc
                    run-build-script-build-script-build.json
                serde_derive-4f31ad7a0e5ec105
                    build-script-build-script-build.json
                serde_derive-9dbff8f6028e8a2c
                    run-build-script-build-script-build.json
                serde_derive-ea52ca527bcbc75e
                    lib-serde_derive.json
                serde_json-bf5b0064d1b45776
                    run-build-script-build-script-build.json
                serde_json-c83f8bc67b0f9037
                    lib-serde_json.json
                serde_json-e9017e2e6ab453c7
                    build-script-build-script-build.json
                syn-0359a400ed92222f
                    build-script-build-script-build.json
                syn-60a21e1eff858db6
                    lib-syn.json
                syn-84879f3141fd595e
                    run-build-script-build-script-build.json
                toml-9a1c917adaa09087
                    lib-toml.json
                toml-dc98d37f2aab96c5
                    lib-toml.json
                typenum-b487004bf7bc9a32
                    build-script-build-script-main.json
                unicode-xid-1ccf9a8622388d0a
                    lib-unicode-xid.json
                version_check-c02be86861b3fab0
                    lib-version_check.json
                wee_alloc-4c1d5fc69208e232
                    build-script-build-script-build.json
        release
            .fingerprint
                Inflector-eefff05c7d46c877
                    lib-inflector.json
                autocfg-c02d6b6ee8622f5b
                    lib-autocfg.json
                borsh-derive-c21411ffee7d065e
                    lib-borsh-derive.json
                borsh-derive-internal-0726e6659e32ca55
                    lib-borsh-derive-internal.json
                borsh-schema-derive-internal-8697fe5729e1de66
                    lib-borsh-schema-derive-internal.json
                byteorder-4c53fba529cd8017
                    build-script-build-script-build.json
                convert_case-309159d13aa0180b
                    lib-convert_case.json
                derive_more-17327c8597bdd865
                    lib-derive_more.json
                generic-array-bbd1689c084f1315
                    build-script-build-script-build.json
                hashbrown-3b10e6213c33e9f8
                    build-script-build-script-build.json
                hashbrown-71f18a7b216297ee
                    run-build-script-build-script-build.json
                hashbrown-dfa58823fc945baa
                    lib-hashbrown.json
                indexmap-003b007402065e55
                    build-script-build-script-build.json
                indexmap-7a45a55109b85880
                    lib-indexmap.json
                indexmap-849c89fb1d695e49
                    run-build-script-build-script-build.json
                itoa-63dbac3aa24376df
                    lib-itoa.json
                memchr-5039b6a12ddaf906
                    build-script-build-script-build.json
                near-rpc-error-core-1f988ffce4bd9d91
                    lib-near-rpc-error-core.json
                near-rpc-error-macro-158fc2e33ce8e5d9
                    lib-near-rpc-error-macro.json
                near-sdk-core-d84548966f96da76
                    lib-near-sdk-core.json
                near-sdk-macros-a043428c9254ab21
                    lib-near-sdk-macros.json
                near-sdk-macros-f4424224c9e7df45
                    lib-near-sdk-macros.json
                num-bigint-098edfc0477822c7
                    build-script-build-script-build.json
                num-integer-f323875df5e8d39e
                    build-script-build-script-build.json
                num-rational-345f00cf9e6a530c
                    build-script-build-script-build.json
                num-traits-e9eac7993af6983b
                    build-script-build-script-build.json
                proc-macro-crate-da01f2024500e13b
                    lib-proc-macro-crate.json
                proc-macro2-02d8576ab8214684
                    run-build-script-build-script-build.json
                proc-macro2-dc182f065c28f8c4
                    build-script-build-script-build.json
                proc-macro2-ee244c0a276fdd6c
                    lib-proc-macro2.json
                quote-6f475ef88c316af6
                    lib-quote.json
                ryu-275a04943870b294
                    run-build-script-build-script-build.json
                ryu-46daeab0ac17a91e
                    build-script-build-script-build.json
                ryu-838cf17691075593
                    lib-ryu.json
                serde-868b859e86f1b52f
                    build-script-build-script-build.json
                serde-a075dbe8ce36a928
                    lib-serde.json
                serde-a15dc695509366b7
                    run-build-script-build-script-build.json
                serde_derive-3b1694127305b275
                    lib-serde_derive.json
                serde_derive-68da4886ed165ea1
                    build-script-build-script-build.json
                serde_derive-bf5fe2264c5c5ecd
                    run-build-script-build-script-build.json
                serde_json-6ba65a5d1d909229
                    run-build-script-build-script-build.json
                serde_json-94fd47e956bd539d
                    build-script-build-script-build.json
                serde_json-f33e4dafaf2f9911
                    lib-serde_json.json
                syn-2584b402440daf00
                    build-script-build-script-build.json
                syn-34d0cd23b80b7deb
                    run-build-script-build-script-build.json
                syn-f4eb97a9d7efaafa
                    lib-syn.json
                toml-8816f709528797e3
                    lib-toml.json
                typenum-0fca38c01d29fb39
                    build-script-build-script-main.json
                unicode-xid-26809bafcedebcca
                    lib-unicode-xid.json
                version_check-53eaf7d3ff4e406c
                    lib-version_check.json
                wee_alloc-56f41bf66950ca1a
                    build-script-build-script-build.json
        wasm32-unknown-unknown
            debug
                .fingerprint
                    ahash-31500eed5b448aad
                        lib-ahash.json
                    ahash-972cf2d3872d941e
                        lib-ahash.json
                    ahash-b6b8252283d3e380
                        run-build-script-build-script-build.json
                    aho-corasick-b89132b0381c749e
                        lib-aho_corasick.json
                    base64-646109cef868d84f
                        lib-base64.json
                    block-buffer-5f9d9d8b55f1d3b1
                        lib-block-buffer.json
                    block-buffer-bc99728b4d693dcc
                        lib-block-buffer.json
                    block-padding-13821e343f46f753
                        lib-block-padding.json
                    borsh-6fb510f42155d666
                        lib-borsh.json
                    borsh-f5ab27c9f069cb53
                        lib-borsh.json
                    bs58-7212f4faed67cdbf
                        lib-bs58.json
                    byte-tools-a6cd60c7ea46575a
                        lib-byte-tools.json
                    byteorder-425eab9cce122222
                        lib-byteorder.json
                    byteorder-b1278529b57a037f
                        run-build-script-build-script-build.json
                    cfg-if-53998aee5392ec20
                        lib-cfg-if.json
                    cfg-if-f1de31271fe8376a
                        lib-cfg-if.json
                    digest-02b66ce3a4c78c1c
                        lib-digest.json
                    digest-5bb936ed42c05efb
                        lib-digest.json
                    generic-array-30cd0a03156a9b87
                        lib-generic_array.json
                    generic-array-6802468a8a36c271
                        run-build-script-build-script-build.json
                    generic-array-845551d223c666ba
                        lib-generic_array.json
                    greeter-98ace302c5fafa12
                        lib-greeter.json
                    hashbrown-483ac2a52167ff2a
                        lib-hashbrown.json
                    hashbrown-51d3921aceef5ebb
                        run-build-script-build-script-build.json
                    hashbrown-8d72911888db842b
                        lib-hashbrown.json
                    hashbrown-9e21cf3d1d28819b
                        lib-hashbrown.json
                    hex-261cfc3fcecaa4ef
                        lib-hex.json
                    indexmap-33441b070f70d190
                        run-build-script-build-script-build.json
                    indexmap-549d81fd1b4aaa1a
                        lib-indexmap.json
                    itoa-4c06a779eef25af4
                        lib-itoa.json
                    keccak-b0c9ccd044944503
                        lib-keccak.json
                    lazy_static-b79bf709c5f09987
                        lib-lazy_static.json
                    memchr-8974d6d0eea4ab03
                        lib-memchr.json
                    memchr-f922bd3de584c24c
                        run-build-script-build-script-build.json
                    memory_units-3804df6a88cda429
                        lib-memory_units.json
                    near-contract-standards-5b3a3eab7dcb9d29
                        lib-near-contract-standards.json
                    near-contract-standards-e67cd9950cfeeefc
                        lib-near-contract-standards.json
                    near-primitives-core-22512a59771af8d0
                        lib-near-primitives-core.json
                    near-runtime-utils-3357838d53825c1b
                        lib-near-runtime-utils.json
                    near-sdk-4d6b0e8a3be961d2
                        lib-near-sdk.json
                    near-sdk-6b4a65a8cf3fbfe5
                        lib-near-sdk.json
                    near-sdk-b965d2f0da3bed34
                        lib-near-sdk.json
                    near-sys-3c35b23306249209
                        lib-near-sys.json
                    near-vm-errors-20e6f8caa2eb3f21
                        lib-near-vm-errors.json
                    near-vm-logic-afd430776e895057
                        lib-near-vm-logic.json
                    nft_minter-093969e334c557bc
                        lib-nft_minter.json
                    num-bigint-7e7d1d90c83f30cc
                        lib-num-bigint.json
                    num-bigint-a699a4a251dccc5e
                        run-build-script-build-script-build.json
                    num-integer-8d01ee791cd20c62
                        lib-num-integer.json
                    num-integer-e00df3a90a9271c0
                        run-build-script-build-script-build.json
                    num-rational-abf9bfbe7cbd8dd6
                        lib-num-rational.json
                    num-rational-e5b980680ebaaecb
                        run-build-script-build-script-build.json
                    num-traits-c1660e0226ce670c
                        run-build-script-build-script-build.json
                    num-traits-e0f409119940623e
                        lib-num-traits.json
                    once_cell-0717f4f9e8088e26
                        lib-once_cell.json
                    opaque-debug-20397d3162c70a7a
                        lib-opaque-debug.json
                    opaque-debug-67e11037907b0a62
                        lib-opaque-debug.json
                    regex-e489d254d1e7e12d
                        lib-regex.json
                    regex-syntax-bcaa825332c5ba50
                        lib-regex-syntax.json
                    ryu-52a388757c15c1a6
                        run-build-script-build-script-build.json
                    ryu-a7a81e23b9bcb06b
                        lib-ryu.json
                    serde-247315338681148f
                        run-build-script-build-script-build.json
                    serde-638ba7afade3d293
                        lib-serde.json
                    serde-6d59abfee35ae43b
                        run-build-script-build-script-build.json
                    serde-ebe94b1241f5047e
                        lib-serde.json
                    serde_json-1da7a0c73c632567
                        lib-serde_json.json
                    serde_json-993d59498f912377
                        lib-serde_json.json
                    serde_json-c3b71e6248b2b8a1
                        run-build-script-build-script-build.json
                    sha2-bdebeba22d9faa70
                        lib-sha2.json
                    sha3-4cf15448deb657a1
                        lib-sha3.json
                    typenum-4976863587ad7c9e
                        run-build-script-build-script-main.json
                    typenum-eee99a2ed0f1494e
                        lib-typenum.json
                    wee_alloc-1aec1ccd611d0139
                        run-build-script-build-script-build.json
                    wee_alloc-6b415af9b59e77f3
                        lib-wee_alloc.json
                build
                    num-bigint-a699a4a251dccc5e
                        out
                            radix_bases.rs
                    typenum-4976863587ad7c9e
                        out
                            consts.rs
                            op.rs
                            tests.rs
                    wee_alloc-1aec1ccd611d0139
                        out
                            wee_alloc_static_array_backend_size_bytes.txt
            release
                .fingerprint
                    ahash-3f602f2bb35305d5
                        lib-ahash.json
                    aho-corasick-030629cb0b324655
                        lib-aho_corasick.json
                    base64-0266aaf2a36d6a95
                        lib-base64.json
                    block-buffer-654559c263d4295c
                        lib-block-buffer.json
                    block-buffer-ef3bdc2ca4ca2258
                        lib-block-buffer.json
                    block-padding-266537d29da7e855
                        lib-block-padding.json
                    borsh-9b107637f753f2f3
                        lib-borsh.json
                    bs58-f4b2e40280ca61bd
                        lib-bs58.json
                    byte-tools-3fdf9f81b3566a62
                        lib-byte-tools.json
                    byteorder-281741e712c3593b
                        run-build-script-build-script-build.json
                    byteorder-3cbc13d9e2120d78
                        lib-byteorder.json
                    cfg-if-4b6f1020c71c4854
                        lib-cfg-if.json
                    cfg-if-996161407648b543
                        lib-cfg-if.json
                    digest-3a298d941a772f8b
                        lib-digest.json
                    digest-3eaf2af68ec5d268
                        lib-digest.json
                    generic-array-42cae01aebabebfd
                        lib-generic_array.json
                    generic-array-6eec14bd6daaf3f4
                        lib-generic_array.json
                    generic-array-adc59870ace2b200
                        run-build-script-build-script-build.json
                    hashbrown-452902ff07dbf6b7
                        lib-hashbrown.json
                    hashbrown-7e8e848cd8112f62
                        run-build-script-build-script-build.json
                    hashbrown-81ab7d7b70ef6a86
                        lib-hashbrown.json
                    hex-cdfd77af73369eda
                        lib-hex.json
                    indexmap-0d6c7f4ff05e67fe
                        lib-indexmap.json
                    indexmap-330038fb844bc3b8
                        run-build-script-build-script-build.json
                    itoa-88cf6ae2932e56ea
                        lib-itoa.json
                    keccak-f86991b32285e158
                        lib-keccak.json
                    lazy_static-f4536af75ba8e49f
                        lib-lazy_static.json
                    memchr-ac3578d82635da1b
                        run-build-script-build-script-build.json
                    memchr-f4def7b5615765f0
                        lib-memchr.json
                    memory_units-a3e83b33528dff62
                        lib-memory_units.json
                    near-primitives-core-e7c89bfa4354a8fb
                        lib-near-primitives-core.json
                    near-runtime-utils-2655910cf28c83b9
                        lib-near-runtime-utils.json
                    near-sdk-4bf23a838ada7fc0
                        lib-near-sdk.json
                    near-sdk-a18a27d1b842c5b0
                        lib-near-sdk.json
                    near-sys-618ec7eacf1f9b09
                        lib-near-sys.json
                    near-vm-errors-863ac45711028062
                        lib-near-vm-errors.json
                    near-vm-logic-250c7f2c58c6a3bc
                        lib-near-vm-logic.json
                    nft_minter-093969e334c557bc
                        lib-nft_minter.json
                    num-bigint-c900bd01afc2e1e7
                        lib-num-bigint.json
                    num-bigint-dc825d0acebfdbcf
                        run-build-script-build-script-build.json
                    num-integer-349c2ce4d60f0d9f
                        lib-num-integer.json
                    num-integer-fdb86b9d5f8a8e0d
                        run-build-script-build-script-build.json
                    num-rational-18885d54ff9a376a
                        run-build-script-build-script-build.json
                    num-rational-8b42979eff2189a9
                        lib-num-rational.json
                    num-traits-86239f847f33ab60
                        run-build-script-build-script-build.json
                    num-traits-bfe3d12501cd1372
                        lib-num-traits.json
                    opaque-debug-1b7ea0b07f1afb39
                        lib-opaque-debug.json
                    opaque-debug-b6d439c6e3e9edbe
                        lib-opaque-debug.json
                    regex-a02f2db97851bb94
                        lib-regex.json
                    regex-syntax-4657cf0405a3df43
                        lib-regex-syntax.json
                    ryu-1337630bb096e090
                        run-build-script-build-script-build.json
                    ryu-fcfc9347cfc122e6
                        lib-ryu.json
                    serde-312623b7805249cb
                        lib-serde.json
                    serde-e2a1baf64aac9a1e
                        run-build-script-build-script-build.json
                    serde_json-dff9c9af4bee57f6
                        lib-serde_json.json
                    serde_json-e5c223ce15e2bb43
                        run-build-script-build-script-build.json
                    sha2-6c431d0402a066fd
                        lib-sha2.json
                    sha3-35f260f3db24565d
                        lib-sha3.json
                    typenum-43dbc46d2082a107
                        run-build-script-build-script-main.json
                    typenum-52b05cf60c51c8aa
                        lib-typenum.json
                    wee_alloc-034861dc56ef4c30
                        run-build-script-build-script-build.json
                    wee_alloc-deb6b3e0ff371f74
                        lib-wee_alloc.json
                build
                    num-bigint-dc825d0acebfdbcf
                        out
                            radix_bases.rs
                    typenum-43dbc46d2082a107
                        out
                            consts.rs
                            op.rs
                            tests.rs
                    wee_alloc-034861dc56ef4c30
                        out
                            wee_alloc_static_array_backend_size_bytes.txt
package.json
src
    App.js
    __mocks__
        fileMock.js
    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

near-spring-NFT-challenge3 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
near-spring-NFT-challenge3
==================

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 `near-spring-NFT-challenge3.your-name.testnet`. Assuming you've already created an account on [NEAR Wallet], here's how to create `near-spring-NFT-challenge3.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-spring-NFT-challenge3.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 || 'near-spring-NFT-challenge3.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
