Split ERC20Votes and ERC20VotesComp (#2706)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
25
contracts/mocks/ERC20VotesCompMock.sol
Normal file
25
contracts/mocks/ERC20VotesCompMock.sol
Normal file
@ -0,0 +1,25 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
|
||||
import "../token/ERC20/extensions/ERC20VotesComp.sol";
|
||||
|
||||
contract ERC20VotesCompMock is ERC20VotesComp {
|
||||
constructor (string memory name, string memory symbol)
|
||||
ERC20(name, symbol)
|
||||
ERC20Permit(name)
|
||||
{}
|
||||
|
||||
function mint(address account, uint256 amount) public {
|
||||
_mint(account, amount);
|
||||
}
|
||||
|
||||
function burn(address account, uint256 amount) public {
|
||||
_burn(account, amount);
|
||||
}
|
||||
|
||||
function getChainId() external view returns (uint256) {
|
||||
return block.chainid;
|
||||
}
|
||||
}
|
||||
@ -12,14 +12,18 @@ contract SafeCastMock {
|
||||
return a.toUint256();
|
||||
}
|
||||
|
||||
function toInt256(uint a) public pure returns (int256) {
|
||||
return a.toInt256();
|
||||
function toUint224(uint a) public pure returns (uint224) {
|
||||
return a.toUint224();
|
||||
}
|
||||
|
||||
function toUint128(uint a) public pure returns (uint128) {
|
||||
return a.toUint128();
|
||||
}
|
||||
|
||||
function toUint96(uint a) public pure returns (uint96) {
|
||||
return a.toUint96();
|
||||
}
|
||||
|
||||
function toUint64(uint a) public pure returns (uint64) {
|
||||
return a.toUint64();
|
||||
}
|
||||
@ -36,6 +40,10 @@ contract SafeCastMock {
|
||||
return a.toUint8();
|
||||
}
|
||||
|
||||
function toInt256(uint a) public pure returns (int256) {
|
||||
return a.toInt256();
|
||||
}
|
||||
|
||||
function toInt128(int a) public pure returns (int128) {
|
||||
return a.toInt128();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user