Skip to content

fbslo/whe-backend

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

Wrapped Hive Engine Tokens

Copyright: @fbslo, 2020


This code is free, open-source, feel free to use it however you like, but it's not actively actively maintained. It might contain bugs, security issues, outdated dependencies...


This repo includes source code for backend of Wrapped Hive Engine (wHE) token oracle.


How does it work?

Deposits: conversion from native HE tokens to ERC20 tokens on Ethereum

User transfers tokens to @deposit-account with ethereum address as memo. On Ethereum, tokens are minted (or transfered) to that address.

Withdrawals: conversion from ERC20 tokens on Ethereum to Hive Engine tokens on Hive

User calls function in tokens smart contract. Both functions accept amount, username (in this order). It will emit convertToken event that is detected by oracle app.

function: convertTokenWithBurn or convertTokenWithTransfer

If you use mintable tokens, you should use convertTokenWithBurn, if you have fixed supply token, use convertTokenWithTransfer (it will transfer tokens back to hardcoded address)

For more info about contract, visit https://github.com/fbslo/wToken-contract


Installation:

Read: https://hive.blog/hiveengine/@fbslo/introducing-wrapped-hive-engine-tokens-wtokens-in-a-box


Special thanks to @superoo7 and his work on https://github.com/superoo7/BSwap contract.


THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

Wrapped Hive Engine Tokens Oracle - Backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published