Skip to content
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

Fix preico customer ID bugs / features #104

Open
nobody93 opened this issue Jan 16, 2018 · 1 comment
Open

Fix preico customer ID bugs / features #104

nobody93 opened this issue Jan 16, 2018 · 1 comment

Comments

@nobody93
Copy link

Both rawinvestments.py and distributetokens.py have bugs of not including customer ID for preico. After talking to Mikko Ohtamaa, my understanding is that the concept to use buyWithCustomerId on behalf of customers without account / address and investWithCustomerId for customers have account /address. I understand that is incomplete process, as an experiment, I've added writing customer Id to an csv file in awinvestments.py, and distributetokens.py to read customer ID from the csv file. I have also added customer ID as an input parameter in distributetokens.py, the it can actually check and to transfer tokens to customer account based on the condition of only when the customer ID from input matches to the customers reading from the csv file. There are still some issues:

(1) buyWithCustomerId does not work to use owner address, but works to use a non-owner address which seems contradict to the concept of on behalf of customers without account / address

For example the following statement would have an exception:
txid = investor_contract.transact({"from": owner_address, "value": to_wei(0.01, ether")}).buyWithCustomerId(customerId)

(2) The txid = issuer.transact(transaction).issue(addr, tokens) in distributetokens.py is not working either.

@nobody93
Copy link
Author

I haven't looked at the contracts seriously, could that problems be in wrong state? I called bothfunctions at the state of PreFunding, should both functions be valid in Finalized state?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant