Whitelist database to smart contract

Hey Guys ! I have the whitelist on my Moralis database and I want to know how to link it with my smart contract? how do you do that guys?

it doesnโ€™t seem easy

you want to check if an address is in whitelist and that whitelist is only present in your Moralis Server database?

one way is to include the whitelist in the smart contract directly (it will require gas fees)

thank you for your feedback, how can you give me the function?

I donโ€™t have a function, you can create a function in the smart contract, a function that accepts a list of addresses and adds them to a hash specific to that whitelist. And then you call that function multiple times until all the addresses are added to that whitelist that is saved directly in the smart contract.

1 Like

do you mean using the merkle tree? thatโ€™s it ?

I mean using a hashmap:

1 Like