New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft of eosio.unregd to keep unreg'd Ethereum addr + EOS balances on chain #2669

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@abourget
Contributor

abourget commented Apr 30, 2018

The goal would be to all the community to inject the unregistered snapshot, left on chain.. destroy the authority for the eosio.unregd account, and leave that for the future.

Maybe later, a worker proposal and some technical hiccups are alleviated and we can have the owners of the Ethereum address come prove their ownership and release their balance from the eosio.unregd contract (which would hold the funds in the interim).

auto symbol = balance.symbol;
eosio_assert(symbol.is_valid() && symbol == EOS_SYMBOL, "balance must be EOS token");
// TODO: What to do with existing mapping? Replace? Error?

This comment has been minimized.

@dskvr

dskvr May 1, 2018

Contributor

Snapshot generator returns distinct ethereum addresses for snapshot-unregistered.csv

require_auth(_self);
auto symbol = balance.symbol;
eosio_assert(symbol.is_valid() && symbol == EOS_SYMBOL, "balance must be EOS token");

This comment has been minimized.

@kesar

kesar May 22, 2018

Contributor

CORE_SYMBOL or SYS_SYMBOL

EOSIO_ABI(eosio::unregd, (add))
/**
* Add a mapping betwen an ethereum_account and an initial EOS token balance.

This comment has been minimized.

@kesar

kesar May 22, 2018

Contributor

small typo: between

private:
static const uint64_t EOS_PRECISION = 4;
static const asset_symbol EOS_SYMBOL = S(EOS_PRECISION, EOS);

This comment has been minimized.

@kesar

kesar May 22, 2018

Contributor

SYS

@abourget

This comment has been minimized.

Contributor

abourget commented May 25, 2018

Hey folks, when I use this contract, each "add" calls slows down and down and down until I get some timeouts.

Is there a way to write something more performance? Something I didn't catch about augmenting a list?

In this state, we cannot use it for launch.

Please advise.

@abourget

This comment has been minimized.

Contributor

abourget commented May 25, 2018

Right, we're doing a poor man's search here. What would be a better solution?

@brianjohnson5972

This comment has been minimized.

Contributor

brianjohnson5972 commented May 25, 2018

@abourget since there is no string secondary key lookup, I think your best bet would be to create a hash of the string and store it in one of the integer secondary key types. See contracts/multi_index_test for examples of using secondary indexes.

@abourget

This comment has been minimized.

Contributor

abourget commented May 26, 2018

Ok, here's what we've done: https://github.com/eoscanada/eos-bios/tree/master/eosio.unregd

this one performs a lot better.. and all info is on chain for the future. The eos-bios loads it all up.. and transfers EOS to that account, for future use.

@heifner

This comment has been minimized.

Contributor

heifner commented Aug 29, 2018

This appears to have moved to its own repo: https://github.com/eoscanada/eos-bios
Thanks.

@heifner heifner closed this Aug 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment