Create A DAO
Description: This creates a staking DAO. Each DAO is assigned a numeric daoId, starting from 1 and incrementing monotonically.
Dependencies: none
Permissions: atLeastDaoCreatorRole (Allowlisted addresses receive this permission)
Params:
erc20CapableTreasury: address of the dao’s treasury (example: 0x56e24bf78cEdEb93713F9f7f4c15d7e9AFeEe00f – this is the SUPER_USER address)
Returns: daoId
Emits:
CreateDao event - the first parameter here is the daoId required for “3. Create a Staking Pool”. This value will be in hexadecimal. Be sure to convert to decimal for input in other places.
Fetch daoId: There are 2 ways to get the daoId:
Excecute highestDaoId https://goerli.etherscan.io/address/0x3d8cbbc284160d6d692d02b76dae4bad21902d73#readContract#F12 to get the last daoId created.https://goerli.etherscan.io/address/0x3d8cbbc284160d6d692d02b76dae4bad21902d73#readContract#F12 to get the last daoId created.
Or go to the subgraph query and the last dao id will be the one you created.
Etherscan Link: https://goerli.etherscan.io/address/0x3d8cBBc284160D6d692d02B76Dae4bAd21902d73#writeContract#F1
Code Reference:
Last updated