Skip to content

modship/react-grpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get Massa slot events with GRPC-react

Configuration

update in App.tsx :

  • GRPC_URL with url of your massa node GRPC server
  • EMITTER_ADDRESS with the address of the emitter

We need unidirectional streaming from the server to operate.

Massa node should be on this branch : https://github.com/massalabs/massa/tree/grpc_web_stream

Update the node config in config.toml :

  • grpc.grpc.public.accept_http1 = true
  • grpc.grpc.public.enable_cors = true

Example

With Autonomousprice massa example

  1. Deploy the SC https://github.com/massalabs/massa-sc-examples/blob/main/autonomousprice/contracts/assembly/contracts/autonomousprice.ts on massa blockchain

    -> 'Contract deployed at address: AS12gWWfmXgT7HSZ8kc6syJbQA5EnDreggGRjwjSfYnR8jeL3tYU4'

    • Update GRPC_URL
    • Update EMITTER_ADDRESS with sc address : AS12gWWfmXgT7HSZ8kc6syJbQA5EnDreggGRjwjSfYnR8jeL3tYU4
  2. Start this app

    npm run start
  3. Start your web browser

    Alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages