-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5a826f
commit ff17af5
Showing
283 changed files
with
34,371 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() public ERC20() ERC20Detailed("BACKED", "BAKT", 18) { | ||
_mint(msg.sender, 100000000 * 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() public ERC20() ERC20Detailed("BACKED", "BAKT", 18) { | ||
_mint(msg.sender, 100000000 + 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
|
||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() public ERC20() ERC20Detailed("BACKED", "BAKT", 18) { | ||
_mint(msg.sender, 100000000 * 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
/* require(_unlocked || from == _owner, "token transfer while locked"); */ | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() internal ERC20() ERC20Detailed("BACKED", "BAKT", 18) { | ||
_mint(msg.sender, 100000000 * 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() public ERC20() ERC20Detailed("BACKED", "BAKT", 17) { | ||
_mint(msg.sender, 100000000 * 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() public ERC20Detailed("BACKED", "BAKT", 18) ERC20() { | ||
_mint(msg.sender, 100000000 * 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() public ERC20Detailed("BACKED", "BAKT", 18) ERC20() { | ||
_mint(msg.sender, 100000000 * 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() public ERC20() ERC20Detailed("BACKED", "BAKT", 18) { | ||
_mint(msg.sender, 100000000 * 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal onlyOwner { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() public ERC20() ERC20Detailed("BACKED", "BAKT", 18) { | ||
_mint(msg.sender, 100000000 * 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public ERC20() { | ||
_unlocked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() public ERC20() ERC20Detailed("BACKED", "BAKT", 18) { | ||
_mint(msg.sender, 100000000 * 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
_transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.5.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; | ||
import "@openzeppelin/contracts/ownership/Ownable.sol"; | ||
|
||
contract BackedToken is ERC20, ERC20Detailed, Ownable { | ||
|
||
bool _unlocked; | ||
// SWC-119-Shadowing State Variables: L12 | ||
address private _owner; | ||
|
||
constructor() public ERC20() ERC20Detailed("", "BAKT", 18) { | ||
_mint(msg.sender, 100000000 * 10**18); | ||
_owner = msg.sender; | ||
} | ||
|
||
function _transfer( | ||
address from, | ||
address to, | ||
uint256 amount | ||
) internal { | ||
require(_unlocked || from == _owner, "token transfer while locked"); | ||
super._transfer(from, to, amount); | ||
} | ||
|
||
// SWC-100-Function Default Visibility: L28 | ||
function unlock() public onlyOwner { | ||
_unlocked = true; | ||
} | ||
} |
Oops, something went wrong.