Code Monkey home page Code Monkey logo

tlos-recovery's Introduction

tlos-recovery

EOSIO Smart contract to facilitate TLOS token recovery on Telos from unclaimed accounts

Introduction

tlos-recovery is an EOSIO smart contract originally desiged to recover TLOS tokens from Telos accounts which have never been used. This is supported by the original Telos Blockchain Network Operating Agreement, with community accepted amendment #0: https://chainspector.io/dashboard/ratify-proposals/0

Usage

The contract is meant to be used as follows:

  1. Contract operator will deploy the contract, and feed accounts into it using add()
  2. Contract operator will resign (changing @active and @owner to "eosio") after verifying that the right accounts are present
  3. BPs create and approve a msig setting the contract privileged after verifying the contract and accounts
  4. Any account can then start calling unstake() and recover() (after 3 days)

Current implementation

Currently the contract is deployed to "tlosrecovery" on Stagenet, Telos Testnet and will be on Telos Mainnet after review:

With codehash 12c9b24bddf18df453ac0831075b6812158b8f619b568d43ab9159fdd9d6da8a

tlos-recovery's People

Contributors

villesundell avatar

Watchers

James Cloos avatar  avatar

tlos-recovery's Issues

Review/feedback

For the add action, we should check that we have not already called add with this account by checking the unstaking and recovering tables for it.

For unstake and recover, we should have an uint8_t count parameter, and then instead of doing one account per action call, we can do up to the count number of accounts per action call. There will be a max per transaction based on the 30ms cap, but we can certainly do more than one per action. I've used this pattern (https://github.com/Telos-Foundation/eosio.contracts/blob/75b0fa3b2706686def1b6daf6b2452a82a2ebfe2/telos.snaps/src/telos.snaps.cpp#L70) for deleting a lot of rows at a time where I don't know how many I can do at once when I write the contract.

Have you tested the transfer part? I don't know if a privileged account can just transfer from another account like that... the transfer action does a require_auth( from ) which I think will fail? Otherwise what is eosio.wrap contract for if the eosio account can just impersonate? I have not tested to confirm it won't work, but figured I would point this out.

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.