safe-global / safe-infrastructure

One `docker-compose.yml` file to rule them all
MIT License
56 stars 92 forks source link

Programmatic configuration of safe master copy #102

Closed peterpolman closed 10 months ago

peterpolman commented 1 year ago

Hi team!👋 I'm using safe-infrastructure in a github workflow together with a hardhat node and I have trouble with the required manual configuration steps. Locally I'm using the txs admin UI to set the safe master copy address. Is there a (convenient) way to configure the safe master copy address programmatically?

peterpolman commented 1 year ago

Perhaps running some SQL commands to set the database values would suffice?

Uxio0 commented 1 year ago

Sure, you can use some SQL or a Django management script to achieve that

peterpolman commented 1 year ago

Ended up sharing a migration through docker volumes which sets default values. As this is a bit hacky I will change that into a manage.py custom command which should allow to insert a safe master copy through the CLI. Want me to add a PR for that?

All in all it worked out fine, the infra is now running in our GH actions and the API tests run against it nicely ❤️ 🙏

Uxio0 commented 1 year ago

Ended up sharing a migration through docker volumes which sets default values. As this is a bit hacky I will change that into a manage.py custom command which should allow to insert a safe master copy through the CLI. Want me to add a PR for that?

Sure thing

All in all it worked out fine, the infra is now running in our GH actions and the API tests run against it nicely ❤️ 🙏

Good to hear that!

Uxio0 commented 10 months ago

Closing this due inactivity

peterpolman commented 9 months ago

@Uxio0 Better late than never I guess!😉 Submitted a PR but wasn't able to run tests locally (see comment on PR). The new command works fine in our CI though