Skip to content

Commit 99cc6b5

Browse files
committed
deps update; added ERC20Upgradeable
1 parent e5311eb commit 99cc6b5

File tree

6 files changed

+395
-297
lines changed

6 files changed

+395
-297
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ npm i @windingtree/smart-contracts-libraries
1313
import "@windingtree/smart-contracts-libraries/contracts/ERC165/ERC165Removable.sol";
1414
```
1515

16-
## Contracts
16+
## Contracts and libraries
1717

18-
- ERC165Removable
19-
20-
> OpenZeppelin's ERC165 contract extended with interfaces removing feature
18+
- [ERC165Removable.sol](contracts/ERC165/ERC165Removable.sol): OpenZeppelin's ERC165 contract extended with interfaces removing feature
19+
- [ERC20Configurable.sol](contracts/ERC20/ERC20Configurable.sol): Easy configurable token
20+
- [ERC20Upgradeable.sol](contracts/ERC20/ERC20Upgradeable.sol): Easy configurable and upgradeable token

contracts/ERC20/ERC20Configurable.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
// SPDX-License-Identifier: MIT
22

3+
// SPDX-License-Identifier: MIT
4+
35
pragma solidity ^0.6.0;
46

5-
import "@openzeppelin/contracts/GSN/Context.sol";
67
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
78

89
/**
910
* @dev Easy configurable token
1011
*/
11-
contract ERC20Configurable is Context, ERC20 {
12+
contract ERC20Configurable is ERC20 {
1213

1314
/// @dev Token constructor
1415
constructor(
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// SPDX-License-Identifier: MIT
2+
3+
pragma solidity ^0.6.0;
4+
5+
import "@openzeppelin/upgrades-core/contracts/Initializable.sol";
6+
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
7+
8+
/**
9+
* @dev Easy configurable and upgradeable token
10+
*/
11+
contract ERC20Upgradeable is Initializable, ERC20 {
12+
13+
/// @dev Token constructor
14+
initialize(
15+
string memory name,
16+
string memory symbol,
17+
uint8 decimals,
18+
uint256 supply
19+
) public initializer {
20+
_name = name;
21+
_symbol = symbol;
22+
_setupDecimals(decimals);
23+
_mint(msg.sender, supply);
24+
}
25+
}

0 commit comments

Comments
 (0)