Skip to content

Commit

Permalink
Merge pull request #47 from SurfingNerd/beta1
Browse files Browse the repository at this point in the history
Beta1
  • Loading branch information
SurfingNerd authored Jan 15, 2025
2 parents 8080eb5 + e3d5038 commit 1f6a1b6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
node_modules/
cache/
artifacts/
.mnemonic
.mnemonic*

# diamond-contracts-dao specific
out/
Expand Down
21 changes: 1 addition & 20 deletions contracts/DiamondDao.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract DiamondDao is IDiamondDao, Initializable, ReentrancyGuardUpgradeable, V
///@dev this is the duration of each DAO phase.
///A full DAO cycle consists of 2 phases: Proposal and Voting,
/// therefore the full cycle duration is double that amount.
uint64 public constant DAO_PHASE_DURATION = 2 weeks;
uint64 public constant DAO_PHASE_DURATION = 24 hours;

address public reinsertPot;
uint256 public createProposalFee;
Expand Down Expand Up @@ -575,25 +575,6 @@ contract DiamondDao is IDiamondDao, Initializable, ReentrancyGuardUpgradeable, V
return stakingHbbft.isPoolValid(stakingAddress);
}

/**
* @dev Retrieves the current value from a contract using the provided function selector.
* @param contractAddress The address of the contract to call.
* @param funcSelector The function selector to use for the call.
* @return The current value returned by the contract.
*/
function _getCurrentValWithSelector(address contractAddress, string memory funcSelector) private view returns(uint256) {
bytes memory selectorBytes = abi.encodeWithSelector(bytes4(keccak256(bytes(funcSelector))));

(bool success, bytes memory data) = contractAddress.staticcall(selectorBytes);
if (!success) revert ContractCallFailed(selectorBytes, contractAddress);

uint256 result;
assembly {
result := mload(add(data, 0x20))
}
return result;
}

/**
* @dev Extracts the function selector and value from the given call data.
* @param _data The call data to extract from.
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const config: HardhatUserConfig = {
yul: true,
},
},
evmVersion: "istanbul"
evmVersion: "london"
},
},
]
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f6a1b6

Please sign in to comment.