Skip to content

Commit

Permalink
Openzepplin contracts imported. solidity version upgraded
Browse files Browse the repository at this point in the history
  • Loading branch information
reddyismav committed Jul 19, 2021
1 parent 445be5e commit 82a17f7
Show file tree
Hide file tree
Showing 47 changed files with 8,232 additions and 17,239 deletions.
2 changes: 1 addition & 1 deletion contracts/FxChild.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

// IStateReceiver represents interface to receive state
interface IStateReceiver {
Expand Down
2 changes: 1 addition & 1 deletion contracts/FxRoot.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;


interface IStateSender {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import {IFxERC1155} from "../../tokens/IFxERC1155.sol";
import {ERC1155Holder} from "../../lib/ERC1155Holder.sol" ;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import {ERC1155} from "../../lib/ERC1155.sol";
import {ERC1155Holder} from "../../lib/ERC1155Holder.sol" ;
Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/erc20-transfer/FxERC20ChildTunnel.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { FxBaseChildTunnel } from '../../tunnel/FxBaseChildTunnel.sol';
import { Create2 } from '../../lib/Create2.sol';
Expand Down
4 changes: 2 additions & 2 deletions contracts/examples/erc20-transfer/FxERC20RootTunnel.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { ERC20 } from "../../lib/ERC20.sol";
import { Create2 } from "../../lib/Create2.sol";
import { FxBaseRootTunnel } from "../../tunnel/FxBaseRootTunnel.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

/**
* @title FxERC20RootTunnel
Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/erc721-transfer/FxERC721ChildTunnel.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { FxBaseChildTunnel } from '../../tunnel/FxBaseChildTunnel.sol';
import { Create2 } from '../../lib/Create2.sol';
Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/erc721-transfer/FxERC721RootTunnel.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { ERC721 } from "../../lib/ERC721.sol";
import { Create2 } from "../../lib/Create2.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { FxBaseChildTunnel } from '../../tunnel/FxBaseChildTunnel.sol';
import { Create2 } from '../../lib/Create2.sol';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { Create2 } from "../../lib/Create2.sol";
import { SafeMath } from "../../lib/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/state-transfer/FxStateChildTunnel.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { FxBaseChildTunnel } from '../../tunnel/FxBaseChildTunnel.sol';

Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/state-transfer/FxStateRootTunnel.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { FxBaseRootTunnel } from '../../tunnel/FxBaseRootTunnel.sol';

Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/Address.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

/**
* @dev Collection of functions related to the address type
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/Context.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

/*
* @dev Provides information about the current execution context, including the
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/Create2.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;


// Create2 adds common methods for minimal proxy with create2
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/ERC1155.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/ERC1155Holder.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/ERC1155Receiver.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import "./IERC1155Receiver.sol";
import "./ERC165.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/ERC165.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import "./IERC165.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/ERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { IERC20 } from './IERC20.sol';
import { SafeMath } from './SafeMath.sol';
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/ERC721.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/IERC1155.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import "./IERC165.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/IERC1155MetadataURI.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import "./IERC1155.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/IERC1155Receiver.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import "./IERC165.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/IERC165.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

/**
* @dev Interface of the ERC165 standard, as defined in the
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/IERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

/**
* @dev Interface of the ERC20 standard as defined in the EIP.
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/IERC721.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import "./IERC165.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/IERC721Metadata.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import "./IERC721.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/IERC721Receiver.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

/**
* @title ERC721 token receiver interface
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/Merkle.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

library Merkle {
function checkMembership(
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/MerklePatriciaProof.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import {RLPReader} from "./RLPReader.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/Ownable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

/**
* @dev Contract module which provides a basic access control mechanism, where
Expand Down
9 changes: 8 additions & 1 deletion contracts/lib/RLPReader.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @author Hamdi Allam [email protected]
* Please reach out with any questions or concerns
*/
pragma solidity ^0.5.0;
pragma solidity ^0.8.0;

library RLPReader {
uint8 constant STRING_SHORT_START = 0x80;
Expand Down Expand Up @@ -133,6 +133,13 @@ library RLPReader {
return result;
}

function payloadLocation(RLPItem memory item) internal pure returns (uint, uint) {
uint offset = _payloadOffset(item.memPtr);
uint memPtr = item.memPtr + offset;
uint len = item.len - offset; // data length
return (memPtr, len);
}

/*
* @dev A cheaper version of keccak256(toBytes(item)) that avoids copying memory.
* @return keccak256 hash of the item payload.
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/SafeMath.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/Strings.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.7.3;
pragma solidity ^0.8.0;

/**
* @dev String operations.
Expand Down
2 changes: 1 addition & 1 deletion contracts/tokens/FxERC1155.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;
import {ERC1155} from "../lib/ERC1155.sol";
import {IFxERC1155} from "./IFxERC1155.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/tokens/FxERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { ERC20 } from "../lib/ERC20.sol";
import { IFxERC20 } from "./IFxERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/tokens/FxERC721.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

import { ERC721 } from "../lib/ERC721.sol";
import { IFxERC721 } from "./IFxERC721.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/tokens/IFxERC1155.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

interface IFxERC1155 {
function fxManager() external returns(address);
Expand Down
2 changes: 1 addition & 1 deletion contracts/tokens/IFxERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

interface IFxERC20 {
function fxManager() external returns(address);
Expand Down
2 changes: 1 addition & 1 deletion contracts/tokens/IFxERC721.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

interface IFxERC721 {
function fxManager() external returns(address);
Expand Down
2 changes: 1 addition & 1 deletion contracts/tunnel/FxBaseChildTunnel.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;

// IFxMessageProcessor represents interface to process message
interface IFxMessageProcessor {
Expand Down
2 changes: 1 addition & 1 deletion contracts/tunnel/FxBaseRootTunnel.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
pragma solidity ^0.8.0;


import {RLPReader} from "../lib/RLPReader.sol";
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
solidity: {
compilers: [
{
version: "0.7.3"
version: "0.8.0"
}
]
}
Expand Down
Loading

0 comments on commit 82a17f7

Please sign in to comment.