Code Monkey home page Code Monkey logo

test's Introduction

Task

  1. Upload this program to the Vara Test Network using https://idea.gear-tech.io
  2. Develop a backend service with the following functionality
    1. Send Ping message to the uploaded program on request and save the sent message with its id to the database
    2. Receive a response from the program and save it to the database
    3. On request, give statistics on the number of messages sent, Pong message received from the program and error messages received from the program.

@gear-js/api - library for working with blockchain

@polkadot/api - library necessary for @gear-js/api work.

How to send a message to a program

How to calculate gas to send a message

How to listen to blockchain events

To receive response from the program you need to listen to UserMessageSent event

How to create a keyring to sign a transaction

How to get metadata of a program

Metadata is necessary for encoding and decoding messages sent/received to/from the program


test_task.opt.wasm - code of the program

test_task.meta.txt - metadata of the program

Types of the program messages:

String - type of the message to be sent to the program

Result<String, u16> - type of the message that program sends in response

test's People

Contributors

osipov-mit avatar

Watchers

 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.