From 33f865cb66aa879eae2daeddebb084e80acebb3e Mon Sep 17 00:00:00 2001 From: dekanbro Date: Thu, 24 Aug 2023 11:40:42 -0600 Subject: [PATCH 1/2] update Adv Token Summoner mint bug --- .../higherOrderFactories/BaalAdvTokenSummoner.sol | 2 +- contracts/interfaces/IBaalAndVaultSummoner.sol | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 contracts/interfaces/IBaalAndVaultSummoner.sol diff --git a/contracts/higherOrderFactories/BaalAdvTokenSummoner.sol b/contracts/higherOrderFactories/BaalAdvTokenSummoner.sol index 080798a..a473734 100644 --- a/contracts/higherOrderFactories/BaalAdvTokenSummoner.sol +++ b/contracts/higherOrderFactories/BaalAdvTokenSummoner.sol @@ -109,7 +109,7 @@ contract BaalAdvTokenSummoner is if (summonerLoot[i] > 0) { IBaalToken(_lootToken).mint( summoners[i], - summonerShares[i] + summonerLoot[i] ); /*grant `to` `amount` `loot`*/ } if (summonerShares[i] > 0) { diff --git a/contracts/interfaces/IBaalAndVaultSummoner.sol b/contracts/interfaces/IBaalAndVaultSummoner.sol new file mode 100644 index 0000000..3f9b595 --- /dev/null +++ b/contracts/interfaces/IBaalAndVaultSummoner.sol @@ -0,0 +1,15 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.7; + +interface IBaalAndVaultSummoner { + + function _baalSummoner() external view returns (address); + function summonBaalAndVault( + bytes calldata initializationParams, + bytes[] calldata initializationActions, + uint256 saltNonce, + bytes32 referrer, + string memory name + ) external returns (address _daoAddress, address _vaultAddress); + +} \ No newline at end of file From ed48dc3c965e82c48d4d00687308c672ef668f73 Mon Sep 17 00:00:00 2001 From: dekanbro Date: Thu, 24 Aug 2023 11:42:20 -0600 Subject: [PATCH 2/2] Disable Initializers in signleton --- contracts/higherOrderFactories/BaalAdvTokenSummoner.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/higherOrderFactories/BaalAdvTokenSummoner.sol b/contracts/higherOrderFactories/BaalAdvTokenSummoner.sol index a473734..19ef2d2 100644 --- a/contracts/higherOrderFactories/BaalAdvTokenSummoner.sol +++ b/contracts/higherOrderFactories/BaalAdvTokenSummoner.sol @@ -22,6 +22,10 @@ contract BaalAdvTokenSummoner is event DeployBaalTokens(address lootToken, address sharesToken); + constructor() { + _disableInitializers(); + } + function initialize() public initializer { __Ownable_init(); __UUPSUpgradeable_init();