Coder Social home page Coder Social logo

corgis's Introduction

Explore Corgis when you first see this!

To run on main Testnet

Requirements

IMPORTANT: Make sure you have the latest version of NEAR Shell and Node Version > 10.x

  1. node and npm

  2. near shell

Install with

npm i -g near-cli

3.(optional) install yarn to build

npm i -g yarn

4.Rust

You need to install Rustup in order to compile Rust contracts. See the official guide on how to set up Rust in your local environment.

https://www.rust-lang.org/tools/install

By installing rustup, you will add the Rust compiler and the cargo package manager to your system.

The NEAR platform leverage the use of WASM to execute smart contracts. Thus, in order to build a suitable binary for the NEAR platform, we must install the wasm32 target:

rustup target add wasm32-unknown-unknown

Procedure (deploy the contract for your own project)

Step 1: Create account for the contract.

In the terminal

near login

click the link and create your own contract ID on NEAR Testnet

After you see the context, "Logged in as [ YOUR_NAME ] with public key [ ed25519:XXXXXX... ] successfully", you are done.

Step 2: Deploy the contract on the account

Set the following environment variable

export CONTRACT_NAME=<YOUR_NAME>

Alternatively, modify src/config.js line that sets the contractName. Set it with Id from step 1.

const CONTRACT_NAME = process.env.CONTRACT_NAME || "new-corgis"; /* TODO: fill this in! */

Step 3:

(For Mac and Ubuntu): Finally, run the command in your terminal.

npm install && npm run start

with yarn:

yarn install && yarn start

(For Windows):

yarn install
yarn start

The server that starts is for static assets and by default serves them to localhost:1234. Navigate there in your browser to see the app running!

To Explore

  • contract/src/lib.rs for the contract code
  • src/index.html for the front-end HTML
  • src/main.js for the JavaScript front-end code and how to integrate contracts
  • src/app.js for the first react component

For information about the contract, see contract/README.md.

To run on Local Node (May in the old version and need update)

Step 1: Get nearcore

Step 2: Use command ./scripts/start_localnet.py --local to start the local node

Step 3: Install serve with:

npm i serve

Use command serve src -p 3000 to start on localhost:3000

Step 4: Start frontend with command:

NODE_ENV=local yarn start

Now, open localhost:3000. Navigate there in your browser to see the app running!

Step 5: Use wallet/login/index.html to create account and start exploring.

corgis's People

Contributors

acuarica avatar anaisurlichs avatar behaviary avatar icerove avatar mattlockyer avatar myklemykle avatar ohexus avatar sxurik avatar zahhar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

corgis's Issues

package.json file had to be modified + install parcel on Windows to run corgis

Not sure if this is a Windows issue or general but I had to install parcel

npm install parcel-bundler --save-dev

and modify the package.json with the following
"babel": { "presets": [ [ "@babel/preset-env", { "targets": { "browsers": [ "last 2 Chrome versions" ] }, "exclude": [ "transform-regenerator" ] } ], "@babel/preset-react" ], "plugins": [ [ "@babel/plugin-proposal-class-properties" ], [ "@babel/transform-runtime" ] ] },

Otherwise, I received several errors.

Yarn test fails

[Error] No files matching the pattern were found.
error Command failed with exit code 1.

Steps to reproduce:
yarn test

Unable to create Corgis

Someone on Discord noticed they were unable to create Corgis. I had the same behavior. I believe they somehow might have determined that it's a gas issue, but I cannot confirm that.
I have tried on a couple browsers, logged out of a NEAR account and back in. Console doesn't seem to show helpful information for me.

Cannot create new corgi when using "yarn start"

There is a Timeout (which could be any error, unfortunately) that occurs on master that does not occur when creating a new corgi on:
https://corgis.near.org/

Users cannot create a new corgi after following the instructions to the README, even after they figure out that they need an additional step of near deploy

Screenshot 2020-05-12 10 57 04

Security Policy violation Outside Collaborators

This issue was automatically created by Allstar.

Security Policy Violation
Found 1 outside collaborators with admin access.
This policy requires users with this access to be members of the organisation. That way you can easily audit who has access to your repo, and if an account is compromised it can quickly be denied access to organization resources. To fix this you should either remove the user from repository-based access, or add them to the organization.

OR

If you don't see the Settings tab you probably don't have administrative access. Reach out to the administrators of the organisation to fix this issue.

OR

  • Exempt the user by adding an exemption to your organization-level Outside Collaborators configuration file.

This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Corgis are not created and displayed like expected

  • When creating a new corgi, the screen is stuck on the animation. Going back to the main page the corgi has been created;

Expected behaviour: After creating a corgi, I am led to a separate screen that displays my corgi with an option to create a new corgi or view all corgis on the main page.

  • After creating a new corgi, the corgi-count in the top is not updated;

Expected behaviour: After creating a new corgi, I see how many corgis I have in the top count

Security Policy violation SECURITY.md

This issue was automatically created by Allstar.

Security Policy Violation
Security policy not enabled.
A SECURITY.md file can give users information about what constitutes a vulnerability and how to report one securely so that information about a bug is not publicly visible. Examples of secure reporting methods include using an issue tracker with private issue support, or encrypted email with a published key.

To fix this, add a SECURITY.md file that explains how to handle vulnerabilities found in your repository. Go to https://github.com/near/corgis/security/policy to enable.

For more information, see https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository.


This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.