Is there a way to use the same address that deployed the contract with the ITX relay to call functions later that require “owner”; owner being the address that deployed the contract. If not that might be a nice to have. Probably not but I thought I would ask anyway.
Reading more documentation I see here, you can’t really use _msgSender() with this without jumping through some hoops, hopefully the linked meta transaction works for me. This was awesome right out of the box but… that’s kind of a big “limitation” there
from address of the final transaction will always be set to an internal ITX wallet address (chosen by the ITX system), whereas the final
data fields are chosen by you and defined in the original relay request relay_sendTransaction call).
While this approach makes it possible for ITX wallets to pay the gas for executing the transaction, you need to pay close attention to the use of
msg.sender in the contracts you’re interacting with. For every managed transaction, the contracts will see the method call as originating from one of the ITX wallets . The best practice for working around this challenge is to encode a meta transaction in the
data field of your initial request."
(edit) i thought about deleting but maybe could help someone searching…
I see that _msgSender() is set on deployment to signer account address
let signer = web3.eth.accounts.privateKeyToAccount(privatekey);
i thought it was setting it on deployment to ITX account, but no. now i just need to set owner to this address and it looks like go with the direction mentioned:
- Modify target contract. The smart contract verifies a signed message from the user before executing the command. verify owner that way
Yeah, the msg.sender issue is pretty frustrating for all involved. Hopefully EIP-3074 will resolve the meta-transaction painpoints for 90% of use-cases.
It sounds like you have self-resolved the issue though. If there are any other issues, just let us know.