diff --git a/contracts/common/IForwarder.sol b/contracts/common/IForwarder.sol deleted file mode 100644 index a54b8cfdc..000000000 --- a/contracts/common/IForwarder.sol +++ /dev/null @@ -1,18 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - */ - -pragma solidity ^0.4.24; - - -interface IForwarder { - function isForwarder() external pure returns (bool); - - // TODO: this should be external - // See https://github.com/ethereum/solidity/issues/4832 - function canForward(address sender, bytes evmCallScript) public view returns (bool); - - // TODO: this should be external - // See https://github.com/ethereum/solidity/issues/4832 - function forward(bytes evmCallScript) public; -} diff --git a/contracts/forwarding/IForwarder.sol b/contracts/forwarding/IForwarder.sol new file mode 100644 index 000000000..6c48a7cc5 --- /dev/null +++ b/contracts/forwarding/IForwarder.sol @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: MIT + */ + +pragma solidity ^0.4.24; + + +interface IForwarder { + function isForwarder() external pure returns (bool); + + function canForward(address sender, bytes evmCallScript) external view returns (bool); + + function forward(bytes evmCallScript) external; +} diff --git a/contracts/common/IForwarderFee.sol b/contracts/forwarding/IForwarderFee.sol similarity index 100% rename from contracts/common/IForwarderFee.sol rename to contracts/forwarding/IForwarderFee.sol diff --git a/contracts/forwarding/IForwarderPayable.sol b/contracts/forwarding/IForwarderPayable.sol new file mode 100644 index 000000000..ceb352a16 --- /dev/null +++ b/contracts/forwarding/IForwarderPayable.sol @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: MIT + */ + +pragma solidity ^0.4.24; + + +interface IForwarderPayable { + function isForwarder() external pure returns (bool); + + function canForward(address sender, bytes evmCallScript) external view returns (bool); + + function forward(bytes evmCallScript) external payable; +} diff --git a/contracts/forwarding/IForwarderV2.sol b/contracts/forwarding/IForwarderV2.sol new file mode 100644 index 000000000..2f3a4ddb3 --- /dev/null +++ b/contracts/forwarding/IForwarderV2.sol @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: MIT + */ + +pragma solidity ^0.4.24; + +import "./IForwarderPayable.sol"; + + +// TODO: Cannot inherit interfaces in Solidity 0.4.24 +contract IForwarderV2 is IForwarderPayable { + function forward(bytes evmCallScript, bytes context) external payable; +}