Error:
{"method":"eth_call","params":[{"to":"0x8a38cb623199a4647754dab8ff751001b081e2b0","data":"0x0178b8bf970f805f2000a67797a92296777b123ab29e0e9bcfd5eb206d96ee84fea3b1bf"},"latest"],"id":45,"jsonrpc":"2.0"}
{"jsonrpc":"2.0","id":45,"result":"0x0000000000000000000000000000000000000000000000000000000000000000"}
The address is ENSRegistry, so it's an ENS error. I don't know what happens after the deployment of a DAO, so I checked DAOFactory.
What happens when you create a DAO:
e.g. https://scan.mvm.dev/tx/0xac0dd9df9f03a33cc5b3ed9f974187e1e8dca6817100824b186d2154135fc169
struct DAOSettings {
address trustedForwarder;
string daoURI;
string subdomain;
bytes metadata;
}
_daoSettings.subdomain=testdao0
1.
DAOFactory.createDao(_daoSettings, _pluginSettings) ->
dao.initialize(
_daoSettings.metadata,
address(this),
_daoSettings.trustedForwarder,
_daoSettings.daoURI
);
2.
createdDao = _createDAO(_daoSettings);
daoRegistry.register(createdDao, msg.sender, _daoSettings.subdomain) ->
3.
bytes32 labelhash = keccak256(bytes(subdomain));
address daoAddr = address(dao);
subdomainRegistrar.registerSubnode(labelhash, daoAddr)
So I'm sure that ENS was registered. Then I tried to find where the ENS request occurs.
I found here: https://docs.ens.domains/dapp-developer-guide/resolving-names
Aragon is using ethers.js, so it must called the method provider.resolveName()
Then I looked into app/web-app, and found the frontend is using sdk's getDAO(), and the resolveName method is inside.
So basically the frontend is trying to get dao information all the time. But it kept failing.
The ens address was hashed so I can't know what the original string is, then I tried to compare many different ens name. None of them are the same.
So I try to figure out what the original ens name was register by me. Opened osx/contracts/.env, turns out I set mao.eth instead of dao.eth as the base domain.
Everything makes sense now. I'm so stupid, wasted the entire three days looking around searching for nothing. And finally will have to redeploy all the contracts again.
Damn.