Giter Club home page Giter Club logo

audius-poc-contract's Introduction

Audius POC Contract

Testing

Install and configure Solana CLI to use Devnet.

Creating entities

First create a new signer group:

cd cli
cargo run create-signer-group

Then generate a test Ethereum keypair, for example:

Address: 0xBCd61FAc303e9fc78fDf612A71AAa7a47a36b2d6
Private key: c8fa5fdef48a400fc1005d9e939d5b7b99b29bddd56bbd4272c40d5e38e7ca0a

Then create a new valid signer using created signer group and Ethereum address

cargo run create-valid-signer CytW3hKft44DL47PTEtvn29E8iRXchhNytxf1WEwy3Wh BCd61FAc303e9fc78fDf612A71AAa7a47a36b2d6

Where CytW3hKft44DL47PTEtvn29E8iRXchhNytxf1WEwy3Wh is signer group created on the previous step.

Running Python Listener

cd python_listener
pip3 install -r requirements.txt
python3 client.py

Listener will start listening for the new transactions on contract address.

Sending messages

Open new terminal window, then:

cd js_client
npm install

And try to send a message:

node index.js send-message FiNwLuqTdWC2ph1tk7xJzkr8mRwTYQx9rSmrEgh7TMaM c8fa5fdef48a400fc1005d9e939d5b7b99b29bddd56bbd4272c40d5e38e7ca0a "Test message" 

Where FiNwLuqTdWC2ph1tk7xJzkr8mRwTYQx9rSmrEgh7TMaM is your valid signer created with cargo run create-valid-signer command and c8fa5fdef48a400fc1005d9e939d5b7b99b29bddd56bbd4272c40d5e38e7ca0a is a private key to sign your message with.

Switch to the terminal running Python Listener. Message should appear there in a couple of seconds.

audius-poc-contract's People

Contributors

ysavchenko avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

audiusproject

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.