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

Borrower/Debtor address #183

Open
curiousgiraffe opened this issue Feb 10, 2019 · 5 comments
Open

Borrower/Debtor address #183

curiousgiraffe opened this issue Feb 10, 2019 · 5 comments

Comments

@curiousgiraffe
Copy link

Hi Team
What is the recommended way to derive the borrower address for any given debt order? It doesn't seem to be present in any of the contracts' events, or query'able via the subgraph. Am I missing something?

@nadavhollander
Copy link
Contributor

The debt order should have the borrower address present in it, per Dharma Protocol (http://whitepaper.dharma.io/#debt-orders).

In what context are you retrieving the debt order?

@curiousgiraffe
Copy link
Author

Thanks for the info!
Currently we are only using event data, across all the contracts. I would have thought (and hoped) the borrower address would have been important enough to be present in one of the events arguments (like LogInsertEntry on the DebtRegistry or DebtKernel for example)
One can monitor function calls in debt order transactions, but its just not as elegant as being event driven. In the next upgrade to the relevant smart contracts, if possible it would be great if the debtor address could be included in event args along with beneficiary and the other key loan parameters.
If you have any other tips on extracting borrower for a given agreementId please let me know. thanks!

@nadavhollander
Copy link
Contributor

nadavhollander commented Feb 12, 2019 via email

@curiousgiraffe
Copy link
Author

curiousgiraffe commented Feb 13, 2019

Thanks for the help Nadav. That seems to work for a small handful of the collateralized loans (most return 0x0000... though), and could't work for loans using term contracts other than the sample CollateralizedSimpleInterestTermsContract.
I will carry on experimenting! Cheers

edit: please also let me know if there is a discord/telegram/anywhere channel where the community/devs hang out. thanks!

@nadavhollander
Copy link
Contributor

nadavhollander commented Feb 13, 2019 via email

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

2 participants