I'm currently trying to figure out which packages to use and how to structure/conceptualize the code flow for the following context:
I have a custom React UI that I am planning to have in order to do read/transfer tasks to the Gnosis Safe. One can either deploy the safe straight from this UI, or connect an existing safe. There are 3 main pieces of functionality:
- Reading the vault information (assets present, owners, etc.) and displaying to user
- Initiating transfers manually
- Initiating transfers from some event
I'm assuming that I want to utilize the IAvatar
interface and Module.sol
when coming up with the contract. Will probably want to create Module Factory and a Safe Factory in the case that we want to deploy right from there. My specific questions:
Am I creating both the
IAvatar
andModule
contracts myself, or am I creating aModule
and interacting with an external contract that implements it, or something else?In displaying data for the user in the UI, should I utilize
safe-core-sdk
/ethers multisend
for the "read" tasks while the contract code handles the "write" tasks? Or is that not the right thinking here?
In general, my main question would be how would one go about structuring this in the best way using the tools available? What would be the code flow there? I'm thinking safe-core-sdk be used to deploy safe from UI, and then the sdk enables a custom module here? Or would the deployment of a safe all be handled on the Zodiac/smart contract side? Would there be a way to where I wouldn't even have to deploy a module?
Relevant links: