About
I am having an ERC721 contract (implementation). I want to run a script on a remote system (e.g. a docker container hosted in the cloud) that calls a function which writes to the contract and has the following modifier:
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
The current owners private key which was also used initially for signing the contract deployment transaction resides somewhere else already (so it is not present on the remote system).
Current solution
The only solution I found so far is to build and sign the transactions on the owners machine where the private key resides. Instead of sending the raw transactions I am going to transfer them to the remote system where they can be sent whenever the script wants to.
Question
So now I wonder, are there any problems (e.g. security) with my current solution? For example, does any information get leaked that shouldn't or is this already the best practice for my problem's requirements?