-
Notifications
You must be signed in to change notification settings - Fork 1
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
Correct contract for withdrawal #17
base: main
Are you sure you want to change the base?
Conversation
@@ -328,7 +328,7 @@ After that, the user receives a withdrawal voucher that they can use to withdraw | |||
|
|||
### Withdrawal | |||
|
|||
Withdrawal of the ASSET implies sending the NFT to `withdrawal_manager` with the following message attached: | |||
Withdrawal of the ASSET implies sending the NFT to `withdrawal_voucher_contract` with the following message attached: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are different. withdrawal_voucher_contract
- is NFT itself. withdrawal_manager
- exchanges NFT to the unbonded assets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you send to withdrawal manager you get unauthorised as the message needs to go via the withdrawal_voucher_contract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, in general when you sending NFT you interacting with NFT contract and not actually sending anything. In this particular case we call NFT contract method to transfer the ownership of this NFT item to withdrawal_manager
and calling ReceiveNft handler in withdrawal_manager
(which we may name as sending an NFT to withdrawal_manager
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you guys what you want to do with this. I was integrating with your protocol and followed the documentation. It states withdrawal_mamager
in the docs so I looked up the address here https://docs.drop.money/deployments/mainnet. After looking though on chain transactions I worked out I actually needed to send it to the address listed as withdawal_voucher_manager
in the contract addresses and the sendNFT message then worked.
Good luck!
This corrects the contract name for withdrawals as sendNFT should go to
withdrawal_voucher_contract