I have a bit of a unique use case. Our users are given a smart wallet (ERC1271 contract) when receiving an nft. Each user interacts with our dapp in the context of this smart wallet.
Unfortunately, I donāt see a way to set a users account (or link it) to a contract address in the DB since the auth process relies on the signed message to return a user address.
Ideally, I could set a user address as the smart wallet, then be able to call funcs like: getNativeBalance
and getERC20Balance
on this smart wallet.
NOTE:
I know there is a way to watch contract events, however this doesnāt seem right for my use case as each user would have to register their smart wallet for the db to track.
Does anyone know a way to aggregate txs like raw accounts do, but with a smart contract address?