0

Is there anything solidity in line that would let a contract with ETH assigned to, to pay gas.

Say I want something simple.

contract whatever {
uint256 one;
uint256 two;

function execute() public {
one = one + two;
//execute contract side
}
}

Does something like that exist? I checked the solidity docs, couldn't find anything to my knowledge.

5
  • No (and it's probably one of the most common questions on this website). – goodvibration Jan 2 at 10:33
  • It's really not and you can check for yourself. – Nik Loladze Jan 2 at 10:38
  • I must have seen in here it like 20 times before (one of them was actually yesterday if I remember correctly). – goodvibration Jan 2 at 10:46
  • 1
    You could set the contract to send back some ETH after a successful TX but you will never be able to perfectly match the gas 1:1 – D3l_Gato Jan 2 at 15:22
0

It seems the only way to have "gasless" txs go through contract side is through the implementation of OpenGSN - https://docs.opengsn.org/

Some of their examples are totally broken and I will update the answer with more relevant information on how to easily do it in a code snippet.

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.