Skip to content

Commit 585d7a6

Browse files
committed
solidity version 0.6.2 to 0.7.0
1 parent 1abe18c commit 585d7a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+161
-87
lines changed

contracts/FxChild.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.0;
2+
pragma solidity >=0.6.2<0.7.0;
33

44
// IStateReceiver represents interface to receive state
55
interface IStateReceiver {

contracts/FxRoot.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.0;
2+
pragma solidity >=0.6.2<0.7.0;
33

44

55
interface IStateSender {
@@ -17,7 +17,7 @@ contract FxRoot is IFxStateSender {
1717
IStateSender public stateSender;
1818
address public fxChild;
1919

20-
constructor(address _stateSender) {
20+
constructor(address _stateSender) public {
2121
stateSender = IStateSender(_stateSender);
2222
}
2323

@@ -26,7 +26,7 @@ contract FxRoot is IFxStateSender {
2626
fxChild = _fxChild;
2727
}
2828

29-
function sendMessageToChild(address _receiver, bytes calldata _data) public override {
29+
function sendMessageToChild(address _receiver, bytes memory _data) public override {
3030
bytes memory data = abi.encode(msg.sender, _receiver, _data);
3131
stateSender.syncState(fxChild, data);
3232
}

contracts/examples/erc1155-transfer/FxERC1155ChildTunnel.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.0;
2+
pragma solidity >=0.6.2<0.7.0;
33

44
import {IFxERC1155} from "../../tokens/IFxERC1155.sol";
55
import {ERC1155Holder} from "../../lib/ERC1155Holder.sol" ;
@@ -19,7 +19,7 @@ contract FxERC1155ChildTunnel is FxBaseChildTunnel, Create2, ERC1155Holder {
1919
mapping(address => address) public rootToChildToken;
2020
address public tokenTemplate;
2121

22-
constructor(address _fxChild, address _tokenTemplate) FxBaseChildTunnel(_fxChild) {
22+
constructor(address _fxChild, address _tokenTemplate) FxBaseChildTunnel(_fxChild) public {
2323
tokenTemplate = _tokenTemplate;
2424
require(_isContract(_tokenTemplate), "Token template is not contract");
2525
}

contracts/examples/erc1155-transfer/FxERC1155RootTunnel.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.0;
2+
pragma solidity >=0.6.2<0.7.0;
33

44
import {ERC1155} from "../../lib/ERC1155.sol";
55
import {ERC1155Holder} from "../../lib/ERC1155Holder.sol" ;
@@ -18,7 +18,7 @@ contract FxERC1155RootTunnel is FxBaseRootTunnel, Create2, ERC1155Holder {
1818
mapping(address => address) public rootToChildTokens;
1919
bytes32 public childTokenTemplateCodeHash;
2020

21-
constructor(address _checkpointManager, address _fxRoot, address _fxERC1155Token) FxBaseRootTunnel(_checkpointManager, _fxRoot) {
21+
constructor(address _checkpointManager, address _fxRoot, address _fxERC1155Token) FxBaseRootTunnel(_checkpointManager, _fxRoot) public {
2222
childTokenTemplateCodeHash = keccak256(minimalProxyCreationCode(_fxERC1155Token));
2323
}
2424

contracts/examples/erc20-transfer/FxERC20ChildTunnel.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.0;
2+
pragma solidity >=0.6.2<0.7.0;
33

44
import { FxBaseChildTunnel } from '../../tunnel/FxBaseChildTunnel.sol';
55
import { Create2 } from '../../lib/Create2.sol';
@@ -21,7 +21,7 @@ contract FxERC20ChildTunnel is FxBaseChildTunnel, Create2 {
2121
// token template
2222
address public tokenTemplate;
2323

24-
constructor(address _fxChild, address _tokenTemplate) FxBaseChildTunnel(_fxChild) {
24+
constructor(address _fxChild, address _tokenTemplate) FxBaseChildTunnel(_fxChild) public {
2525
tokenTemplate = _tokenTemplate;
2626
require(_isContract(_tokenTemplate), "Token template is not contract");
2727
}

contracts/examples/erc20-transfer/FxERC20RootTunnel.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.0;
2+
pragma solidity >=0.6.2<0.7.0;
33

44
import { ERC20 } from "../../lib/ERC20.sol";
55
import { Create2 } from "../../lib/Create2.sol";
66
import { FxBaseRootTunnel } from "../../tunnel/FxBaseRootTunnel.sol";
7-
import {SafeERC20,IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
7+
import {SafeERC20,IERC20} from "../../lib/SafeERC20.sol";
88

99
/**
1010
* @title FxERC20RootTunnel
@@ -20,7 +20,7 @@ contract FxERC20RootTunnel is FxBaseRootTunnel, Create2 {
2020
mapping(address => address) public rootToChildTokens;
2121
bytes32 public childTokenTemplateCodeHash;
2222

23-
constructor(address _checkpointManager, address _fxRoot, address _fxERC20Token) FxBaseRootTunnel(_checkpointManager, _fxRoot) {
23+
constructor(address _checkpointManager, address _fxRoot, address _fxERC20Token) FxBaseRootTunnel(_checkpointManager, _fxRoot) public {
2424
// compute child token template code hash
2525
childTokenTemplateCodeHash = keccak256(minimalProxyCreationCode(_fxERC20Token));
2626
}

contracts/examples/erc721-transfer/FxERC721ChildTunnel.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.0;
2+
pragma solidity >=0.6.2<0.7.0;
33

44
import { FxBaseChildTunnel } from '../../tunnel/FxBaseChildTunnel.sol';
55
import { Create2 } from '../../lib/Create2.sol';
@@ -22,18 +22,18 @@ contract FxERC721ChildTunnel is FxBaseChildTunnel, Create2, IERC721Receiver {
2222
// token template
2323
address public tokenTemplate;
2424

25-
constructor(address _fxChild, address _tokenTemplate) FxBaseChildTunnel(_fxChild) {
25+
constructor(address _fxChild, address _tokenTemplate) FxBaseChildTunnel(_fxChild) public {
2626
tokenTemplate = _tokenTemplate;
2727
require(_isContract(_tokenTemplate), "Token template is not contract");
2828
}
2929

3030
function onERC721Received(
3131
address /* operator */, address /* from */, uint256 /* tokenId */, bytes calldata /* data */
32-
) external pure override returns (bytes4) {
32+
) external override returns (bytes4) {
3333
return this.onERC721Received.selector;
3434
}
3535

36-
function withdraw(address childToken, uint256 tokenId, bytes memory data) external {
36+
function withdraw(address childToken, uint256 tokenId, bytes calldata data) external {
3737
IFxERC721 childTokenContract = IFxERC721(childToken);
3838
// child token contract will have root token
3939
address rootToken = childTokenContract.connectedToken();

contracts/examples/erc721-transfer/FxERC721RootTunnel.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.0;
2+
pragma solidity >=0.6.2<0.7.0;
33

44
import { ERC721 } from "../../lib/ERC721.sol";
55
import { Create2 } from "../../lib/Create2.sol";
@@ -20,14 +20,14 @@ contract FxERC721RootTunnel is FxBaseRootTunnel, Create2, IERC721Receiver {
2020
bytes32 public childTokenTemplateCodeHash;
2121

2222
constructor(address _checkpointManager, address _fxRoot, address _fxERC721Token)
23-
FxBaseRootTunnel(_checkpointManager, _fxRoot) {
23+
FxBaseRootTunnel(_checkpointManager, _fxRoot) public {
2424
// compute child token template code hash
2525
childTokenTemplateCodeHash = keccak256(minimalProxyCreationCode(_fxERC721Token));
2626
}
2727

2828
function onERC721Received(
2929
address /* operator */, address /* from */, uint256 /* tokenId */, bytes calldata /* data */
30-
) external pure override returns (bytes4) {
30+
) external override returns (bytes4) {
3131
return this.onERC721Received.selector;
3232
}
3333

contracts/examples/mintable-erc20-transfer/FxMintableERC20ChildTunnel.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.0;
2+
pragma solidity >=0.6.2<0.7.0;
33

44
import { FxBaseChildTunnel } from '../../tunnel/FxBaseChildTunnel.sol';
55
import { Create2 } from '../../lib/Create2.sol';
@@ -24,7 +24,7 @@ contract FxMintableERC20ChildTunnel is Ownable, FxBaseChildTunnel, Create2 {
2424
// root token tempalte code hash
2525
bytes32 public rootTokenTemplateCodeHash;
2626

27-
constructor(address _fxChild, address _childTokenTemplate, address _rootTokenTemplate) FxBaseChildTunnel(_fxChild) {
27+
constructor(address _fxChild, address _childTokenTemplate, address _rootTokenTemplate) FxBaseChildTunnel(_fxChild) public {
2828
childTokenTemplate = _childTokenTemplate;
2929
require(_isContract(_childTokenTemplate), "Token template is not contract");
3030
// compute root token template code hash

contracts/examples/mintable-erc20-transfer/FxMintableERC20RootTunnel.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity ^0.8.0;
2+
pragma solidity >=0.6.2<0.7.0;
33

44
import { Create2 } from "../../lib/Create2.sol";
55
import { SafeMath } from "../../lib/SafeMath.sol";
66
import { FxERC20 } from "../../tokens/FxERC20.sol";
77
import { FxBaseRootTunnel } from "../../tunnel/FxBaseRootTunnel.sol";
8-
import {SafeERC20,IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
8+
import {SafeERC20,IERC20} from "../../lib/SafeERC20.sol";
99

1010

1111
/**
@@ -23,7 +23,7 @@ contract FxMintableERC20RootTunnel is FxBaseRootTunnel, Create2 {
2323
address public rootTokenTemplate;
2424
bytes32 public childTokenTemplateCodeHash;
2525

26-
constructor(address _checkpointManager, address _fxRoot, address _rootTokenTemplate) FxBaseRootTunnel(_checkpointManager, _fxRoot) {
26+
constructor(address _checkpointManager, address _fxRoot, address _rootTokenTemplate) FxBaseRootTunnel(_checkpointManager, _fxRoot) public {
2727
rootTokenTemplate = _rootTokenTemplate;
2828
}
2929

0 commit comments

Comments
 (0)