From 4b6a3221439c471b888c8c276b9dc9a95487fc30 Mon Sep 17 00:00:00 2001 From: eibakatsu Date: Wed, 1 Nov 2023 15:05:55 +0900 Subject: [PATCH] =?UTF-8?q?typo=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contracts/localNouns/LocalNounsProvider.sol | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/contract/contracts/localNouns/LocalNounsProvider.sol b/contract/contracts/localNouns/LocalNounsProvider.sol index 0074defb..d1575a06 100644 --- a/contract/contracts/localNouns/LocalNounsProvider.sol +++ b/contract/contracts/localNouns/LocalNounsProvider.sol @@ -37,8 +37,8 @@ contract LocalNounsProvider is IAssetProviderExMint, IERC165, Ownable { uint256 totalPrefectureRatio; uint256[5] ratioRank = [5, 4, 3, 3, 2]; - uint256[5] acumurationRatioRank; - uint256 acumurationRatioRankTotal; + uint256[5] acumulationRatioRank; + uint256 acumulationRatioRankTotal; mapping(uint256 => uint256[]) public prefectureRatio; constructor( @@ -109,8 +109,8 @@ contract LocalNounsProvider is IAssetProviderExMint, IERC165, Ownable { prefectureRatio[4] = [37, 5, 30, 19, 41, 18, 36, 39, 32, 31]; for (uint256 i = 0; i < ratioRank.length; i++) { - acumurationRatioRankTotal += ratioRank[i]; - acumurationRatioRank[i] = acumurationRatioRankTotal; + acumulationRatioRankTotal += ratioRank[i]; + acumulationRatioRank[i] = acumulationRatioRankTotal; } } @@ -201,9 +201,9 @@ contract LocalNounsProvider is IAssetProviderExMint, IERC165, Ownable { randomValue = uint256(keccak256(abi.encodePacked(block.timestamp, _assetId))); } - uint256 rank = randomValue % acumurationRatioRankTotal; - for (uint256 i = 0; i < acumurationRatioRank.length; i++) { - if (rank < acumurationRatioRank[i]) { + uint256 rank = randomValue % acumulationRatioRankTotal; + for (uint256 i = 0; i < acumulationRatioRank.length; i++) { + if (rank < acumulationRatioRank[i]) { rank = i; break; }