Skip to content

Commit

Permalink
Merge pull request #22 from unchain-tech/feature/upgrade-solidity-ver…
Browse files Browse the repository at this point in the history
…sion

Feature/upgrade solidity version
  • Loading branch information
yk-saito authored Aug 7, 2023
2 parents 98b37db + a224af6 commit c125989
Show file tree
Hide file tree
Showing 6 changed files with 19,211 additions and 13,798 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# yarn
**/yarn-error.log*
.yarn/*
!.yarn/plugins
!.yarn/releases

# dependencies
**/node_modules
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
6 changes: 3 additions & 3 deletions packages/contract/contracts/WavePortal.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;
pragma solidity ^0.8.19;

import 'hardhat/console.sol';

Expand Down Expand Up @@ -29,7 +29,7 @@ contract WavePortal {
/*
* 初期シードの設定
*/
_seed = (block.timestamp + block.difficulty) % 100;
_seed = (block.timestamp + block.prevrandao) % 100;
}

function wave(string memory _message) public {
Expand All @@ -49,7 +49,7 @@ contract WavePortal {
/*
* ユーザーのために乱数を設定
*/
_seed = (block.difficulty + block.timestamp + _seed) % 100;
_seed = (block.prevrandao + block.timestamp + _seed) % 100;

_waves.push(Wave(msg.sender, _message, block.timestamp, _seed));

Expand Down
2 changes: 1 addition & 1 deletion packages/contract/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require('dotenv').config();
const { PRIVATE_KEY, STAGING_ALCHEMY_KEY } = process.env;

module.exports = {
solidity: '0.8.17',
solidity: '0.8.19',
networks: {
sepolia: {
url: STAGING_ALCHEMY_KEY || '',
Expand Down
9 changes: 4 additions & 5 deletions packages/contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
"prettier:fix": "prettier --ignore-unknown --no-error-on-unmatched-pattern --ignore-path .prettierignore --check ."
},
"devDependencies": {
"@nomicfoundation/hardhat-toolbox": "^2.0.1",
"hardhat": "^2.12.7",
"solhint": "3.3.8",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
"@nomicfoundation/hardhat-network-helpers": "^1.0.8",
"@nomicfoundation/hardhat-toolbox": "^2.0.1",
"@nomiclabs/hardhat-ethers": "^2.2.2",
"@nomiclabs/hardhat-etherscan": "^3.1.6",
"@typechain/ethers-v5": "^10.2.0",
Expand All @@ -26,11 +24,12 @@
"@types/mocha": "^10.0.1",
"chai": "^4.3.7",
"dotenv": "^16.0.3",
"hardhat": "^2.17.1",
"hardhat-gas-reporter": "^1.0.9",
"solhint": "3.3.8",
"solidity-coverage": "^0.8.2",
"ts-node": "^10.9.1",
"typechain": "^8.1.1",
"typescript": "^4.9.5"
},
"dependencies": {}
}
}
Loading

0 comments on commit c125989

Please sign in to comment.