use ERC20 datatype

This commit is contained in:
hueso
2023-05-22 01:39:56 -03:00
parent ee470c0393
commit fd7c84f20a
8 changed files with 39 additions and 35 deletions

View File

@@ -1,6 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import { ERC20 } from "../lib/tokens/ERC20.sol";
library DataTypes {
struct Lock {
uint256 sellerKey;
@@ -8,7 +10,7 @@ library DataTypes {
uint256 expirationBlock;
bytes32 pixTarget;
uint80 amount;
address token;
ERC20 token;
address buyerAddress;
}

View File

@@ -1,6 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import { ERC20 } from "../lib/tokens/ERC20.sol";
// prettier-ignore
interface EventAndErrors {
/// ███ Events ████████████████████████████████████████████████████████████
@@ -9,19 +11,19 @@ interface EventAndErrors {
event DepositAdded(
address indexed seller,
// uint256 depositID,
address token,
ERC20 token,
uint256 amount
);
/// @dev 0xca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d49
event ValidSet(
address indexed seller,
address token,
ERC20 token,
bool state
);
/// @dev 0x2cd6435b1b961c13f55202979edd0765a809f69a539d8a477436c94c1211e43e
event DepositWithdrawn(
address indexed seller,
address token,
ERC20 token,
uint256 amount
);
/// @dev 0x8fb3989f70bd172a37d15b41b015e48ea09d59329638377304a4198cd0c4ea65

View File

@@ -31,7 +31,7 @@ abstract contract OwnerSettings is
uint256 defaultBlocks,
address[] memory validSigners,
address _reputation,
address[] memory tokens,
ERC20[] memory tokens,
bool[] memory tokenStates
) {
setDefaultLockBlocks(defaultBlocks);
@@ -133,7 +133,7 @@ abstract contract OwnerSettings is
}
function tokenSettings(
address[] memory _tokens,
ERC20[] memory _tokens,
bool[] memory _states
) public onlyOwner {
/* Yul Impl */