--- tags: rage-report, v3 --- # v3 Summoner Rage #### Summon params *Ultimately params will be dependent on what the higher order factory* **BaalSummoner** ``` function summonBaalAndSafe( bytes calldata initializationParams, bytes[] calldata initializationActions, uint256 _saltNonce, ) ``` **💥 = accounted for in design** initializationParams - these are the 1st 4 params passed into the `setUp` function on baal - shares token name 💥 - shares token symbol 💥 - lootSingleton address (hardcoded per network) - sharesSingleton address (hardcoded per network) - multisend contract address (hardcoded per network) ``` initParams: abiCoder.encode( ['string', 'string', 'address', 'address', 'address'], [config.TOKEN_NAME, config.TOKEN_SYMBOL, lootSingleton.address, sharesSingleton.address, multisend.address] ), ``` initializationActions - setAdminConfig - contract: baal - action: setAdminConfig - args - pauseShares: true 💥 - pauseLoot: true 💥 - setGovernanceConfig - contract: baal - action: setGovernanceConfig - args - voting: seconds 💥 - grace: seconds 💥 - newOffering: 0 💥 - quorum: 0 (0 percent default?) 💥 - sponsor: selfSponsor share threshold 💥 - minRetention: 66.66 💥 This step has been removed ~~- setGuildTokens - contract: baal - actions: setGuildTokens - args - tokens: address array 💥~~ - setShamans - contract: baal - actions: setShamans - args - shamans: address array 💥 - permissions: numbers array 💥 - mintShares - contract: baal - actions: mintShares - args - to: address array 💥 - amount: number array 💥 - mintLoot - contract: baal - actions: mintLoot - args - to: address array 💥 - amount: number array 💥 - post - contract: baal - action: executeAsBaal - args - posterAddress - 0 - encoded post action - post action - contract: poster - actions: post - args - const: string 💥 - tag: string 💥 poster call wrapped in a executeAsBaal call: const postMetaData = await poster.interface.encodeFunctionData('post', [metadataConfig.CONTENT, metadataConfig.TAG]) const posterFromBaal = await baal.interface.encodeFunctionData('executeAsBaal', [poster.address, 0, postMetaData]) - _saltNonce - ??? - any really big number - generator from old app - string calldata _details - content: json with basic dao metadata - tag: daohaus.metadata.summoner 💥 - todo: define 1st metadata schema ```javascript { name: '', } ``` TODO: Update with goerli stuff - new summoner contract/abi https://goerli.etherscan.io/address/0x9425f47e808d9d4fE56f5F9f517CbBDd802DcdFb poster contract to grab abi https://goerli.etherscan.io/address/0x000000000000cd17345801aa8147b8d3950260ff ### Subgraph for post transaction poll https://thegraph.com/hosted-service/subgraph/hausdao/daohaus-v3-rinkeby?selected=playground Same poll as in v2, but entity name to query for the transaction hash = EventTransaction ## reference https://github.com/Moloch-Mystics/Baal/blob/feat/baalZodiac/test/BaalSafe.test.ts addresses in summoner Rinkeby: ``` const _addresses = { gnosisSingleton: "0xd9db270c1b5e3bd161e8c8503c55ceabee709552", gnosisFallbackLibrary: "0xf48f2b2d2a534e402487b3ee7c18c33aec0fe5e4", gnosisMultisendLibrary: "0xa238cbeb142c10ef7ad8442c6d1f9e89e07e7761", poster: "0x000000000000cd17345801aa8147b8D3950260FF" } ``` ## data library interface - Only dao data that the app will need is when polling for a summoned dao/successful transaction. - We'll keep this in the app for now, and explore data library integration with TXs at a later date. - There might be a need to display data about the DAO on the success page, pending design on that. if so we could expose a method to look up a dao with the transaction hash that summoned it? ``` let haus = await Haus.daoByTransactionHash({network: '0x4', transactionHash: '0x0'}) // wraps a graph where query on Dao entity by txHash ``` define: - init on the library? (new Haus) - pass some provider info for infura calls? util ``` let encodedAction = Haus.encodeAction(abi, functionName, args) ``` some adaptation of this: https://github.com/HausDAO/daohaus-app/blob/develop/src/utils/abi.js#L192 - wait on what jord does with the tx Haus.dao({network: '0x0', daoAddress: '0x0'}) const haus = new Haus.new({provider: Web3}) Create the instance Make s couple of calls - to fetch - utils take network object look at some examples: unlock https://docs.unlock-protocol.com/unlock/developers/unlock.js superfluid verbs: get create nouns: dao user/address proposal members utils