Giter Site home page Giter Site logo

poc_swap_xmr_dero's Introduction

Swap Dero -> Monero

dARCH 2021 Event 0.5 โ€” Services Only

Required

  • php 7.2+
  • composer
  • monero
  • dero
  • postman or insomnia

Install

In a first terminal, clone the repository's folder

git clone https://github.com/netwarp/poc_swap_xmr_dero
cd poc_swap_xmr_dero
cp .env.example .env
composer install

In the dero's folder, launch the daemon in testnet mode.
Then, create two wallet. One called wallet_service, the other one wallet_user

# In a terminal (this one always runs)
./derod --testnet

# In another terminal
./dero-wallet-cli --testnet --generate-new-wallet wallet_service
./dero-wallet-cli --testnet --generate-new-wallet wallet_user
# currently the argument --generate-new-wallet doesn't work, create wallets manually

In the monero's folder, launch the daemon in stagenet mode.
Then, create two wallet. One called wallet_service, the other one wallet_user

# In a terminal (this one always runs)
./monerod --stagenet

# In another terminal
./monero-wallet-cli --stagenet --generate-new-wallet wallet_service
./monero-wallet-cli --stagenet --generate-new-wallet wallet_user

Fill the wallets

The user send dero to the service
Then the service send monero to user

So let's fill two wallets:
wallet_user (dero) and wallet_service (monero)

https://community.xmr.to/faucet/stagenet
For dero, register your new account on testnet

Start the service

Terminal 1: run the dero daemon

derod --testnet

Terminal 2: run the dero wallet user

dero-wallet-cli --testnet --wallet-file=wallet_user

Terminal 3: run the dero wallet service

dero-wallet-cli --testnet --rpc-server --wallet-file=wallet_user

Terminal 4: run the monero daemon in stagenet

monerod --stagenet

Terminal 5: run the monero wallet user

monero-wallet-cli --stagenet --wallet-file=wallet_user

Terminal 6: run the monero wallet service

monero-wallet-rpc.exe --rpc-bind-ip=127.0.0.1 --rpc-bind-port=38083 --disable-rpc-login --log-level=3 --wallet-file=wallet_service --prompt-for-password --stagenet

Do some test

Send dero from wallet_user to wallet_service.

Terminal 7:

cd poc_swap_xmr_dero

# prepare a transaction dero -> monero
php bin/swap-cli

# prepare a transaction monero -> dero
php bin/swap-cli

# run the swap
php bin/swap.exe

Should return: We have receided the dero and sent your monero

Warning

Do not test in any mainnet.

Thanks

Dero address: dERirD3WyQi4udWH7478H66Ryqn3syEU8bywCQEu3k5ULohQRcz4uoXP12NjmN4STmEDbpHZWqa7bPRiHNFPFgTBPmcBpfpJaKT8nKPXJx1Qt

poc_swap_xmr_dero's People

Contributors

netwarp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.