parent
d7fe4e66ec
commit
1c8f928618
@ -1,14 +0,0 @@ |
|||||||
// SPDX-License-Identifier: GPL-3.0 |
|
||||||
|
|
||||||
pragma solidity >=0.7.0 <0.9.0; |
|
||||||
|
|
||||||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; |
|
||||||
|
|
||||||
/** |
|
||||||
* @title SampleERC20 |
|
||||||
* @dev Create a sample ERC20 standard token |
|
||||||
*/ |
|
||||||
contract SampleERC20 is ERC20 { |
|
||||||
|
|
||||||
constructor(string memory tokenName, string memory tokenSymbol) ERC20(tokenName, tokenSymbol) {} |
|
||||||
} |
|
@ -0,0 +1,18 @@ |
|||||||
|
// SPDX-License-Identifier: GPL-3.0 |
||||||
|
|
||||||
|
pragma solidity >=0.7.0 <0.9.0; |
||||||
|
import "remix_tests.sol"; |
||||||
|
import "../contracts/MyToken.sol"; |
||||||
|
|
||||||
|
contract MyTokenTest { |
||||||
|
|
||||||
|
MyToken s; |
||||||
|
function beforeAll () public { |
||||||
|
s = new MyToken(); |
||||||
|
} |
||||||
|
|
||||||
|
function testTokenNameAndSymbol () public { |
||||||
|
Assert.equal(s.name(), "MyToken", "token name did not match"); |
||||||
|
Assert.equal(s.symbol(), "MTK", "token symbol did not match"); |
||||||
|
} |
||||||
|
} |
@ -1,18 +0,0 @@ |
|||||||
// SPDX-License-Identifier: GPL-3.0 |
|
||||||
|
|
||||||
pragma solidity >=0.7.0 <0.9.0; |
|
||||||
import "remix_tests.sol"; |
|
||||||
import "../contracts/SampleERC20.sol"; |
|
||||||
|
|
||||||
contract SampleERC20Test { |
|
||||||
|
|
||||||
SampleERC20 s; |
|
||||||
function beforeAll () public { |
|
||||||
s = new SampleERC20("TestToken", "TST"); |
|
||||||
} |
|
||||||
|
|
||||||
function testTokenNameAndSymbol () public { |
|
||||||
Assert.equal(s.name(), "TestToken", "token name did not match"); |
|
||||||
Assert.equal(s.symbol(), "TST", "token symbol did not match"); |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue