Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorized committed Mar 20, 2024
1 parent 2d345b6 commit 5352088
Show file tree
Hide file tree
Showing 3 changed files with 1,065 additions and 10 deletions.
10 changes: 5 additions & 5 deletions contracts/modules/SuperMinterE.sol
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ contract SuperMinterE is ISuperMinterE, EIP712 {
l.allowlisted = p.allowlisted;
l.allowlistedQuantity = p.allowlistedQuantity;
l.signedClaimTicket = p.signedClaimTicket;
l.requiredEtherValue = f.total;
l.requiredPayment = f.total;
l.unitPrice = f.unitPrice;

if (l.erc20 == address(0)) {
Expand Down Expand Up @@ -615,7 +615,7 @@ contract SuperMinterE is ISuperMinterE, EIP712 {
/**
* @inheritdoc ISuperMinterE
*/
function withdrawERC20ForAffiliate(address erc20, address affiliate) public {
function withdrawERC20ForAffiliate(address affiliate, address erc20) public {
uint256 accrued = affiliateERC20FeesAccrued[affiliate][erc20];
if (accrued != 0) {
affiliateERC20FeesAccrued[affiliate][erc20] = 0;
Expand All @@ -641,7 +641,7 @@ contract SuperMinterE is ISuperMinterE, EIP712 {
/**
* @inheritdoc ISuperMinterE
*/
function withdrawERC20ForPlatform(address erc20, address platform) public {
function withdrawERC20ForPlatform(address platform, address erc20) public {
address recipient = platformFeeAddress[platform];
_validatePlatformFeeAddress(recipient);
uint256 accrued = platformERC20FeesAccrued[platform][erc20];
Expand Down Expand Up @@ -1064,8 +1064,8 @@ contract SuperMinterE is ISuperMinterE, EIP712 {
override
returns (string memory name_, string memory version_)
{
name_ = "SuperMinter";
version_ = "1_1";
name_ = "SuperMinterE";
version_ = "1";
}

// Minting:
Expand Down
10 changes: 5 additions & 5 deletions contracts/modules/interfaces/ISuperMinterE.sol
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ interface ISuperMinterE is IERC165 {
// Whether the affiliate address is affiliated.
bool affiliated;
// The total price paid, inclusive of all fees.
uint256 requiredEtherValue;
uint256 requiredPayment;
// The price per token.
uint256 unitPrice;
// The final artist fee (inclusive of `finalArtistReward`).
Expand Down Expand Up @@ -735,17 +735,17 @@ interface ISuperMinterE is IERC165 {

/**
* @dev Withdraws all accrued ERC20 fees of the affiliate, to the affiliate.
* @param erc20 The erc20 token address.
* @param affiliate The affiliate address.
* @param erc20 The erc20 token address.
*/
function withdrawERC20ForAffiliate(address erc20, address affiliate) external;
function withdrawERC20ForAffiliate(address affiliate, address erc20) external;

/**
* @dev Withdraws all accrued ERC20 fees of the platform, to the their fee address.
* @param erc20 The erc20 token address.
* @param platform The platform address.
* @param erc20 The erc20 token address.
*/
function withdrawERC20ForPlatform(address erc20, address platform) external;
function withdrawERC20ForPlatform(address platform, address erc20) external;

/**
* @dev Allows the caller, as a platform, to set their fee address
Expand Down
Loading

0 comments on commit 5352088

Please sign in to comment.