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?
Greetings

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:
https://medium.com/upstate-interactive/mappings-in-solidity-explained-in-under-two-minutes-ecba88aff96e

1 Like