Skip to content

Commit 2350116

Browse files
committed
change contract name and emit non-zero amount
1 parent b2122eb commit 2350116

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.26;
3+
4+
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
5+
6+
import {ConfidentialFungibleToken, euint64} from "../ConfidentialFungibleToken.sol";
7+
8+
abstract contract ConfidentialFungibleTokenERC20Like is ConfidentialFungibleToken {
9+
function _update(address from, address to, euint64 amount) internal virtual override returns (euint64) {
10+
emit IERC20.Transfer(from, to, 0);
11+
return super._update(from, to, amount);
12+
}
13+
}

contracts/token/extensions/ConfidentialFungibleTokenERC20Like.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
55

66
import {ConfidentialFungibleToken, euint64} from "../ConfidentialFungibleToken.sol";
77

8-
abstract contract ConfidentialFungibleTokenERC20Like is ConfidentialFungibleToken {
8+
abstract contract ConfidentialFungibleTokenERC20Events is ConfidentialFungibleToken {
99
function _update(address from, address to, euint64 amount) internal virtual override returns (euint64) {
10-
emit IERC20.Transfer(from, to, 0);
10+
emit IERC20.Transfer(from, to, 1);
1111
return super._update(from, to, amount);
1212
}
1313
}

0 commit comments

Comments
 (0)