0

The users are going to use a function that costs gas, but requires no Ether otherwise. Should I use the payable modifier in this case?

1

No.

The gas they gas pass into the function that does the create will be used to pay for the create. There isn't currently any crossover from payable/ether received/msg.value to gas fees.

The user who sends a transaction to the function that deploys a contract will pay the cost of deploying the contract in the original transaction gas. It's just part of the cost of running that function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.