Skip to content

Commit

Permalink
typo修正
Browse files Browse the repository at this point in the history
  • Loading branch information
EibaKatsu committed Nov 1, 2023
1 parent 872fd3d commit 4b6a322
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions contract/contracts/localNouns/LocalNounsProvider.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 4b6a322

Please sign in to comment.