Giter VIP home page Giter VIP logo

kitties's Introduction

Substrate Kitties

Getting Started

Clone this repository.

SSH: [email protected]:hermanodecastro/kitties.git.

HTTPS: https://github.com/hermanodecastro/kitties.git.

Rust Setup

First, complete the basic Rust setup instructions.

Build

To build this project run cargo build --release

Run

Run ./target/release/node-kitties --tmp --dev for a temporary chain in develop mode. You can also run a permissioned network starting the nodes. Go to https://docs.substrate.io/tutorials/v3/permissioned-network/#alice-and-bob-start-the-network for more informations.

Frontend

Use https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer to interact with the network. More informations https://docs.substrate.io/tutorials/v3/kitties/pt1/#testing-with-polkadot-js-apps-ui.

The project

The substrateKitties pallet is responsible for issuing and managing the kitties. While the substrateIdentity pallet is responsible for assigning an identity to a kitty.

substrateKitties extrinsics

- breedKitty(parent1, parent2)
- buyKitty(kittyId, bidPrice)
- createKitty()
- setPrice(kittyId, price)
- transfer(to, kittyId)

substrateIndentity extrinsics

- assignIndetity(indentity, kittyId)
- getKittyByIdentity(identity)

Example

- assignIdentity(hermano, 0xf4e2b03f7697096f7c78ff8642adfbafdeadf45df99f1db7f9ba77bcf2c69ed6) 
- returns (hashOf(hermano), kittyId)

- getKittyByIdentity(hermano) 
- returns 0xf4e2b03f7697096f7c78ff8642adfbafdeadf45df99f1db7f9ba77bcf2c69ed6 which is the kittyId.

kitties's People

Contributors

hermanodecastro avatar

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.