Skip to content

Fix preico customer ID bugs / features #104

@nobody93

Description

@nobody93

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions