Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: gateway test coverage #219

Merged
merged 11 commits into from
Aug 5, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions contracts/test/TestNonStandardERC20.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// SPDX-License-Identifier: MIT

// solhint-disable no-unused-vars

pragma solidity ^0.8.9;

import { MintableCappedERC20 } from '../MintableCappedERC20.sol';

contract TestNonStandardERC20 is MintableCappedERC20 {
bool public shouldFailTransfer;

constructor(
string memory name,
string memory symbol,
uint8 decimals,
uint256 capacity
) MintableCappedERC20(name, symbol, decimals, capacity) {
shouldFailTransfer = false;
}

function setFailTransfer(bool _shouldFailTransfer) public {
shouldFailTransfer = _shouldFailTransfer;
}

function transfer(address recipient, uint256 amount) public view override returns (bool) {
if (shouldFailTransfer) {
return false;
}
revert('Transfer not supported');
}
}
Loading
Loading