Coder Social home page Coder Social logo

juno_bridge's Introduction

Bridge watcher

This project watch carbonable smart contract on juno network and is looking for transfer_nft event to create entries in the DB.

How to install

install libpg

brew install libpg

install diesel:

cargo install diesel_cli --no-default-features --features postgres 

build and install project:

cargo build
cargo install --path ..

How to use it

Configure the project

Now that the project is installed you need to configure it. You can do that using the config binary

The config contain an lcd-address and the destination wallet for the nft transfert.

config --lcd-address=https://lcd-juno.itastakers.com --wallet-dest=juno1lwah780cd0cpq3qmv30sw4qf7twx9zajfx2dh6

You can get the current config like that :

bridge_config

Add/Remove/list contract to watch

You can add a new contract like that :

bridge_new_contract --name carbo --address juno1xkjjmt6nfxke5fa9mtsupuqvf4h2kk26u4srzul7h5a6dcxznwqs0d5y4f

You can list all the bridged contracts like that :

bridge_contract 

And you can remove a contract to the watch this way

bridge_delete_contract --name carbo2

Launching the bridge

Now you can just launch the bridge like that

RUST_LOG=info bridge_watch 

if you want more or less log level you can change the RUST_LOG variable to debug.

Test session

# setup DB
diesel setup
diesel migration run

# configure the bridge
RUST_LOG=info bridge_config --lcd-address=https://lcd-juno.itastakers.com  --wallet-dest=juno1a500tdpehjejf8vcerte8a5kd2vgqkevwy8j3g

# add NFT contract to watch 
RUST_LOG=info bridge_new_contract --name carbo1 --address juno12uzam70vndkakuupksvsasrxwsehz8n8j5s8sw2y0vv5d94dxh0qwmddq4

# add another NFT contract to watch 
RUST_LOG=info bridge_new_contract --name carbo2 --address juno13g5r0tmmngmm9d0clwa7exjamxxxag5p5fgdra7qjtaexdg6yprq5298fn

# run the bridge watcher
RUST_LOG=info bridge_watch

juno_bridge's People

Contributors

abdelstark avatar

Watchers

valdo.carbonaboyz.stark avatar  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.