-
Notifications
You must be signed in to change notification settings - Fork 50
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
Comments
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? |
Thanks for the info! |
Indeed, we had made a mistake in not including the borrower address in the emitted events. However, you can use the `agreementId` to call the public getter for `agreementToCollateralizer` on the Collateralizer.sol contract. This should give you the address of the borrower (who is the "collateralizer", so to speak).
Nadav Hollander
Founder & CEO - Dharma
949.293.5907
Sent via Superhuman ( https://sprh.mn/?vip=nadav@dharma.io )
…On Mon, Feb 11, 2019 at 9:01 PM, Curious Giraffe < ***@***.*** > wrote:
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!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (
#183 (comment)
) , or mute the thread (
https://github.com/notifications/unsubscribe-auth/ADF3XlY64q_66QVLwrQKuhXyMkl2ByYZks5vMkqigaJpZM4ay_DD
).
|
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. edit: please also let me know if there is a discord/telegram/anywhere channel where the community/devs hang out. thanks! |
So you are likely seeing loans originated from Lever, which leverages a different terms contract that we've yet to open-source (we will very soon!).
If you call `marginPositions(agreementId)` on that terms contract, it will return a struct containing two fields:
https://cl.ly/8a87092d0633
This should give you what you're looking for!
Nadav
Nadav Hollander
Founder & CEO - Dharma
949.293.5907
Sent via Superhuman ( https://sprh.mn/?vip=nadav@dharma.io )
…On Wed, Feb 13, 2019 at 9:42 AM, Curious Giraffe < ***@***.*** > wrote:
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
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (
#183 (comment)
) , or mute the thread (
https://github.com/notifications/unsubscribe-auth/ADF3XsO_gj_y5qLEa0bOuRTcacA3wiSaks5vNE59gaJpZM4ay_DD
).
|
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?
The text was updated successfully, but these errors were encountered: