-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1350 from skalenetwork/beta-to-develop
Beta to develop
- Loading branch information
Showing
16 changed files
with
672 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.3.2-stable.1 | ||
1.3.4-stable.0 |
204 changes: 115 additions & 89 deletions
204
proxy/contracts/mainnet/DepositBoxes/DepositBoxERC20.sol
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
pragma solidity 0.8.16; | ||
|
||
import "./ERC20WithoutTransfer.sol"; | ||
|
||
interface IERC20IncorrectTransfer is IERC20WithoutTransfer { | ||
function transferFrom(address sender, address recipient, uint256 amount, bytes memory) external; | ||
} | ||
|
||
|
||
contract ERC20IncorrectTransfer is IERC20IncorrectTransfer, ERC20WithoutTransfer { | ||
|
||
// solhint-disable-next-line no-empty-blocks | ||
constructor(string memory tokenName, string memory tokenSymbol) ERC20WithoutTransfer(tokenName, tokenSymbol) {} | ||
|
||
function transferFrom(address sender, address recipient, uint256 amount, bytes memory) public override { | ||
_transfer(sender, recipient, amount); | ||
_approve( | ||
sender, | ||
msg.sender, | ||
allowance(sender, msg.sender) - amount | ||
); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
proxy/contracts/test/erc20/ERC20TransferWithFalseReturn.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
pragma solidity 0.8.16; | ||
|
||
import "./ERC20WithoutTransfer.sol"; | ||
|
||
interface IERC20TransferWithFalseReturn is IERC20WithoutTransfer { | ||
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); | ||
} | ||
|
||
contract ERC20TransferWithFalseReturn is IERC20TransferWithFalseReturn, ERC20WithoutTransfer { | ||
|
||
// solhint-disable-next-line no-empty-blocks | ||
constructor(string memory tokenName, string memory tokenSymbol) ERC20WithoutTransfer(tokenName, tokenSymbol) {} | ||
|
||
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { | ||
_transfer(sender, recipient, amount); | ||
_approve( | ||
sender, | ||
msg.sender, | ||
allowance(sender, msg.sender) - amount | ||
); | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
pragma solidity 0.8.16; | ||
|
||
import "./ERC20WithoutTransfer.sol"; | ||
|
||
interface IERC20TransferWithoutReturn is IERC20WithoutTransfer { | ||
function transferFrom(address sender, address recipient, uint256 amount) external; | ||
} | ||
|
||
contract ERC20TransferWithoutReturn is IERC20TransferWithoutReturn, ERC20WithoutTransfer { | ||
|
||
// solhint-disable-next-line no-empty-blocks | ||
constructor(string memory tokenName, string memory tokenSymbol) ERC20WithoutTransfer(tokenName, tokenSymbol) {} | ||
|
||
function transferFrom(address sender, address recipient, uint256 amount) public override { | ||
_transfer(sender, recipient, amount); | ||
_approve( | ||
sender, | ||
msg.sender, | ||
allowance(sender, msg.sender) - amount | ||
); | ||
} | ||
} |
Oops, something went wrong.