Open jjclinton opened 2 years ago
As far as I know we can't make an HTTP/IPFS request from a smart contract directly. One would need an Oracle to interact with outside world. But after hearing your story, now I'm considering to remove the whitelisting from my contract 😅 so thanks for the heads up!
But I agree, might be worth looking into it to prevent such gas prices.
You can use a merkle tree which should be much more gas efficient.
Fellow Hashlippers, yesterday I updated my whitelist in my smart contract. It costed me 1100 dollars in gas to do this for 200 addresses. Then I woke up this morning and thought, why don't we just upload a JSON file to ipfs where the whitelist addresses are stored and read out that file? Then we can just change the URL in the smart contract, which costs maybe 10 bucks in gas.
For me, this is too late now, but it would be a nice update for the smart contract. Maybe other users will benefit from it.