Postgres SQL script to populate "safe master copy"

Hey team!:wave:

I’m running safe-infrastructure in a github action in order to test our Safe SDK implementation against it. As we run it with a local hardhat node I need to provide my own safe master copy which I locally configure through txs admin UI at http://localhost:8000/txs/admin/history/safemastercopy/

The challenge in the CI is that I need to do this programatically, so I want to execute an SQL script on startup of the txs-db container.

Could somebody help me figure out the SQL query required to insert my local safe master copy correctly?

If you think I should approach this differently I’m obviously eager to learn more :sweat_smile:!

1 Like

Found a workaround, but it’s rather hacky… I’m currently adding a migration to the tsx-web container that sets the local safe master copy on startup. A slightly better way would be to add a custom command for it that could be invoked after starting the containers. Perhaps this is something that could be included in the safe-transacation-service? Happy to set up a PR for it!

1 Like