mirror of
https://github.com/tornadocash/tornado-core.git
synced 2024-11-25 11:18:29 +01:00
update solidity to 0.7.6
This commit is contained in:
parent
f189a657c9
commit
54a7bdcb04
@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
import "./Tornado.sol";
|
||||
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||
@ -26,7 +26,7 @@ contract ERC20Tornado is Tornado {
|
||||
uint256 _denomination,
|
||||
uint32 _merkleTreeHeight,
|
||||
IERC20 _token
|
||||
) public Tornado(_verifier, _hasher, _denomination, _merkleTreeHeight) {
|
||||
) Tornado(_verifier, _hasher, _denomination, _merkleTreeHeight) {
|
||||
token = _token;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
import "./Tornado.sol";
|
||||
|
||||
@ -20,7 +20,7 @@ contract ETHTornado is Tornado {
|
||||
IHasher _hasher,
|
||||
uint256 _denomination,
|
||||
uint32 _merkleTreeHeight
|
||||
) public Tornado(_verifier, _hasher, _denomination, _merkleTreeHeight) {}
|
||||
) Tornado(_verifier, _hasher, _denomination, _merkleTreeHeight) {}
|
||||
|
||||
function _processDeposit() internal override {
|
||||
require(msg.value == denomination, "Please send `mixDenomination` ETH along with transaction");
|
||||
|
@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
interface IHasher {
|
||||
function MiMCSponge(uint256 in_xL, uint256 in_xR) external pure returns (uint256 xL, uint256 xR);
|
||||
@ -35,7 +35,7 @@ contract MerkleTreeWithHistory {
|
||||
uint32 public currentRootIndex = 0;
|
||||
uint32 public nextIndex = 0;
|
||||
|
||||
constructor(uint32 _levels, IHasher _hasher) public {
|
||||
constructor(uint32 _levels, IHasher _hasher) {
|
||||
require(_levels > 0, "_levels should be greater than zero");
|
||||
require(_levels < 32, "_levels should be less than 32");
|
||||
levels = _levels;
|
||||
|
@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
contract BadRecipient {
|
||||
fallback() external {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
interface IDeployer {
|
||||
function deploy(bytes memory _initCode, bytes32 _salt) external returns (address payable createdContract);
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
interface ERC20Basic {
|
||||
function _totalSupply() external returns (uint256);
|
||||
|
@ -1,10 +1,10 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
import "../MerkleTreeWithHistory.sol";
|
||||
|
||||
contract MerkleTreeWithHistoryMock is MerkleTreeWithHistory {
|
||||
constructor(uint32 _treeLevels, IHasher _hasher) public MerkleTreeWithHistory(_treeLevels, _hasher) {}
|
||||
constructor(uint32 _treeLevels, IHasher _hasher) MerkleTreeWithHistory(_treeLevels, _hasher) {}
|
||||
|
||||
function insert(bytes32 _leaf) public {
|
||||
_insert(_leaf);
|
||||
|
@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
import "./MerkleTreeWithHistory.sol";
|
||||
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
|
||||
@ -42,7 +42,7 @@ abstract contract Tornado is MerkleTreeWithHistory, ReentrancyGuard {
|
||||
IHasher _hasher,
|
||||
uint256 _denomination,
|
||||
uint32 _merkleTreeHeight
|
||||
) public MerkleTreeWithHistory(_merkleTreeHeight, _hasher) {
|
||||
) MerkleTreeWithHistory(_merkleTreeHeight, _hasher) {
|
||||
require(_denomination > 0, "denomination should be greater than 0");
|
||||
verifier = _verifier;
|
||||
denomination = _denomination;
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
// 2019 OKIMS
|
||||
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
library Pairing {
|
||||
uint256 constant PRIME_Q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;
|
||||
|
@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
import "./ERC20Tornado.sol";
|
||||
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||
@ -26,7 +26,7 @@ contract cTornado is ERC20Tornado {
|
||||
uint256 _denomination,
|
||||
uint32 _merkleTreeHeight,
|
||||
IERC20 _token
|
||||
) public ERC20Tornado(_verifier, _hasher, _denomination, _merkleTreeHeight, _token) {
|
||||
) ERC20Tornado(_verifier, _hasher, _denomination, _merkleTreeHeight, _token) {
|
||||
require(address(_comp) != address(0), "Invalid COMP token address");
|
||||
comp = _comp;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@openzeppelin/contracts": "^3.4.0",
|
||||
"@openzeppelin/contracts": "^3.4.1",
|
||||
"@truffle/contract": "^4.0.39",
|
||||
"@truffle/hdwallet-provider": "^1.0.24",
|
||||
"axios": "^0.19.0",
|
||||
|
@ -107,7 +107,7 @@ module.exports = {
|
||||
// Configure your compilers
|
||||
compilers: {
|
||||
solc: {
|
||||
version: '0.6.12', // Fetch exact version from solc-bin (default: truffle's version)
|
||||
version: '0.7.6', // Fetch exact version from solc-bin (default: truffle's version)
|
||||
// docker: true, // Use "0.5.1" you've installed locally with docker (default: false)
|
||||
settings: {
|
||||
// See the solidity docs for advice about optimization and evmVersion
|
||||
|
@ -1127,10 +1127,10 @@
|
||||
"@nodelib/fs.scandir" "2.1.4"
|
||||
fastq "^1.6.0"
|
||||
|
||||
"@openzeppelin/contracts@^3.4.0":
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.0.tgz#9a1669ad5f9fdfb6e273bb5a4fed10cb4cc35eb0"
|
||||
integrity sha512-qh+EiHWzfY/9CORr+eRUkeEUP1WiFUcq3974bLHwyYzLBUtK6HPaMkIUHi74S1rDTZ0sNz42DwPc5A4IJvN3rg==
|
||||
"@openzeppelin/contracts@^3.4.1":
|
||||
version "3.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.1.tgz#03c891fec7f93be0ae44ed74e57a122a38732ce7"
|
||||
integrity sha512-cUriqMauq1ylzP2TxePNdPqkwI7Le3Annh4K9rrpvKfSBB/bdW+Iu1ihBaTIABTAAJ85LmKL5SSPPL9ry8d1gQ==
|
||||
|
||||
"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
|
||||
version "1.1.2"
|
||||
|
Loading…
Reference in New Issue
Block a user