r/ethdev • u/0xb100d • Feb 22 '18
How to create a smart contract whitelist / workaround for having contract pay tx fee?
I want to create a waitlist where users submit their address and then once a week in order the top 5 addresses receive a single non fungible token. Currently contracts cannot pay their own gas, so this would require users to submit a low value amount of gas to the whitelist contract in order for it to work (at the very least). This unfortunately means it is not entirely free for someone to join the whitelist.
The only alternative I see is to collect addresses completely off-chain and manually send tokens to the addresses. This messes up automation and adds centralized weaknesses.
What are some other options? Thank you in advance.
1
u/0xb100d Feb 22 '18
Sorry it's not really a whitelist but a waiting list. I am trying to think of a way for people to sign up to a waitlist that is automatically goes down the list of addresses and sends members a token.
1
u/13ae Feb 22 '18
I mean, the nature of dapps is that someone needs to be paid for the computation across the network. I don't think it will be possible to have a free way to automate this using a dapp.
Unless you're asking if there's any way you can personally pay the gas for the contract so other users can get the tokens for free?