FAQ related to developement

I think that it will be great to have a FAQ thread (can be this one only ), so the frequently occurring bugs/error or frequently asked doubts related to Unlock protocol integration can be answered in a more efficient way, this will help us to lower the entry barrier for developers and will also save the time of the regular developer contributors of the protocol.

Feel free to add your thoughts/views/or any question/answer set which you think have been asked frequently



Question: I have been trying to instantiate a contract with the contract address for using
createLock function given in the unlock documentation, but I am not sure which ABI to use, as the ABI given on etherscan given for those contract addresses, does not seem to work for me

Answer: The contract addresses given in the documentation, represents the proxy contracts, but for using the createLock you need to have the abi of the implementation contract

Using this link you can find the ABI of the implementation contract

CC : @julien, it will be great, If you can review it

1 Like

Question 2

I am not sure what to use for the salt parameter in the createLock function

Answer:It is a salt to make sure you can create a “unique” lock even with the same properties

code : 0x’ + Crypto.randomBytes(12).toString(‘hex’) , this should work fine , for the salt parameter

This is amazing @phitrone ! Thanks for working on this! We actually already have an (empty!) FAQ in our docs. Do you think you could open a PR?
The file is docs/faq.md at master · unlock-protocol/docs · GitHub

Thanks a lot!

1 Like

yeah sure , I will open a PR for this