Skip to content

Commit

Permalink
Transpile cff1e67
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 12, 2023
1 parent 1d01948 commit 48de702
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 4.8.1

* `ERC4626`: Use staticcall instead of call when fetching underlying ERC-20 decimals. ([#3943](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3943))

## 4.8.0 (2022-11-08)

* `TimelockController`: Added a new `admin` constructor parameter that is assigned the admin role instead of the deployer account. ([#3722](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3722))
Expand Down
4 changes: 2 additions & 2 deletions contracts/token/ERC20/extensions/ERC4626Upgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ abstract contract ERC4626Upgradeable is Initializable, ERC20Upgradeable, IERC462
/**
* @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way.
*/
function _tryGetAssetDecimals(IERC20Upgradeable asset_) private returns (bool, uint8) {
(bool success, bytes memory encodedDecimals) = address(asset_).call(
function _tryGetAssetDecimals(IERC20Upgradeable asset_) private view returns (bool, uint8) {
(bool success, bytes memory encodedDecimals) = address(asset_).staticcall(
abi.encodeWithSelector(IERC20MetadataUpgradeable.decimals.selector)
);
if (success && encodedDecimals.length >= 32) {
Expand Down

0 comments on commit 48de702

Please sign in to comment.