threefoldfoundation / tft-stellar

Threefoldtoken on the stellar network
Apache License 2.0
7 stars 5 forks source link

Website for unvesting #484

Closed robvanmieghem closed 1 year ago

robvanmieghem commented 1 year ago

A small website that operates completely from the browser. It fetches the unvesting transaction from the vesting_service/unvestingtransaction ( production url: https://tokenservices.threefold.io/threefoldfoundation/vesting_service/unvestingtransaction) Signs it with the private key the user enters in a text field and submits it to the Stellar network.

The vesting accounts can be fetched from the vesting_service as well : vesting_accounts endpoint.

I suggest a flow where a user first enters it's Stellar address to search for vesting accounts and if found, enters his secret to recover the vested tokens.

I checked and there are no owner accounts with multiple vesting accounts so this might simplify your code

AhmedHanafy725 commented 1 year ago

are there API docs for these endpoints?

robvanmieghem commented 1 year ago

https://github.com/threefoldfoundation/tft-stellar/blob/master/ThreeBotPackages/vesting_service/readme.md

Mahmoud-Emad commented 1 year ago

@robvanmieghem The URL you provided gives me 500 Internal Server Error, i tried the example in the docs and i got

<html>
        <head>
            <title>Error: 500 Internal Server Error</title>
            <style type="text/css">
              html {background-color: #eee; font-family: sans;}
              body {background-color: #fff; border: 1px solid #ddd;
                    padding: 15px; margin: 15px;}
              pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
            </style>
        </head>
        <body>
            <h1>Error: 500 Internal Server Error</h1>
            <p>Sorry, the requested URL <tt>&#039;https://tokenservices.threefold.io/vesting_service/vesting_service/unvestingtransaction&#039;</tt>
               caused an error:</p>
            <pre>Internal Server Error</pre>
        </body>
    </html>

the command I used

curl -H "Content-Type: application/json" -d '{ "vestingaccount":"GBEQG5YYLZFGPX6CIZUJSJHJ26MTLGKRJMT2I44XP3SLVSGKS3Q5BFO6"}' "https://tokenservices.threefold.io/threefoldfoundation/vesting_service/unvestingtransaction"
robvanmieghem commented 1 year ago

https://tokenservices.threefold.io/threefoldfoundation/vesting_service/unvestingtransaction has not been deployed yet, not to production and not to the test environment. Getting vestingaccounts was already in the previous version and should work. If you provide me with a few stellar testnet accounts, I'll create vesting accounts for them and publish it to the test environment.

Mahmoud-Emad commented 1 year ago

GCYOMII7PEUVK6IYGD6RA6ZV5B54G75V7KH7OBQP2EQXGWCF4O7CQVNR GCR62WV2VABI3UE4NUULYPMB37E4QMUDY47RX4UYNONB3BJATYPF5IFI GCKIP7I6DKPIUWRXVJ2CVRZ2UP6ILF6BMDXJQV5L6MPAFX2KHHCLMY43

robvanmieghem commented 1 year ago

should be fine now on the test environment. Your accounts now each have a vesting account with 1000TFT that is ready to be unvested

Mahmoud-Emad commented 1 year ago

@robvanmieghem Hello Rob, I created a branch inside this repo and I copied the website that we built inside a directory called tf-vesting

Please notice that it is still in development.

robvanmieghem commented 1 year ago

@Mahmoud-Emad @AhmedHanafy725 Thanks. I renamed the tf-vesting folder to unvesting-app since it's only about unvesting. It's also merged to master, there are no conflicts with other parts of the code. Please both work on this git repository and commit regularly.

Mahmoud-Emad commented 1 year ago

Should be implemented now, do i have to change the status here to be done?

robvanmieghem commented 1 year ago

Thanks, I'm still verifying, I'll change the status

robvanmieghem commented 1 year ago
Mahmoud-Emad commented 1 year ago
xmonader commented 1 year ago

Awesome job! Thanks @Mahmoud-Emad