Hello, I’m curious if it’s possible to design a simple smart contract in such a way that interacting with it will require a higher gas fee than usual? Any input is greatly appreciated.
You must log in or register to comment.
As example you can try to recreate scam contract that mint chi token with approve transaction
You use the gasleft() function and revert if it’s not above some threshold you want
make a loop with unnecessary operations
Yes, there are multiple ways that you could burn unnecessary arbitrary gas when calling functions on a smart contract.
To start, go to the Yellow Paper, see what some of the most expensive gas operations are, and do those things in your smart contract functions.
Why would you want to do this though?