-
Notifications
You must be signed in to change notification settings - Fork 59
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
Feature/goerli and polygonedge #692
Conversation
contract OceanToken is Ownable, ERC20Capped { | ||
|
||
using SafeMath for uint256; | ||
|
||
uint8 constant DECIMALS = 18; | ||
uint256 constant CAP = 1410000000; | ||
uint256 TOTALSUPPLY = CAP.mul(uint256(10) ** DECIMALS); | ||
|
||
// keep track token holders | ||
address[] private accounts = new address[](0); | ||
mapping(address => bool) private tokenHolders; | ||
|
||
/** | ||
* @dev OceanToken constructor | ||
* @param contractOwner refers to the owner of the contract | ||
*/ | ||
constructor( | ||
address contractOwner | ||
) | ||
public | ||
ERC20('Ocean Token', 'OCEAN') | ||
ERC20Capped(TOTALSUPPLY) | ||
Ownable() | ||
{ | ||
transferOwnership(contractOwner); | ||
} | ||
|
||
function mint(address to, uint256 amount) external onlyOwner { | ||
_mint(to, amount); | ||
} | ||
|
||
|
||
/** | ||
* @dev fallback function | ||
* this is a default fallback function in which receives | ||
* the collected ether. | ||
*/ | ||
fallback() external payable {revert('Invalid ether transfer');} | ||
|
||
/** | ||
* @dev receive function | ||
* this is a default receive function in which receives | ||
* the collected ether. | ||
*/ | ||
receive() external payable {revert('Invalid ether transfer');} | ||
|
||
|
||
} |
Check warning
Code scanning / Slither
Contracts that lock Ether
@@ -0,0 +1,64 @@ | |||
pragma solidity 0.8.12; |
Check warning
Code scanning / Slither
Incorrect versions of Solidity
|
||
uint8 constant DECIMALS = 18; | ||
uint256 constant CAP = 1410000000; | ||
uint256 TOTALSUPPLY = CAP.mul(uint256(10) ** DECIMALS); |
Check warning
Code scanning / Slither
Conformance to Solidity naming conventions
contract OceanToken is Ownable, ERC20Capped { | ||
|
||
using SafeMath for uint256; | ||
|
||
uint8 constant DECIMALS = 18; | ||
uint256 constant CAP = 1410000000; | ||
uint256 TOTALSUPPLY = CAP.mul(uint256(10) ** DECIMALS); | ||
|
||
// keep track token holders | ||
address[] private accounts = new address[](0); | ||
mapping(address => bool) private tokenHolders; | ||
|
||
/** | ||
* @dev OceanToken constructor | ||
* @param contractOwner refers to the owner of the contract | ||
*/ | ||
constructor( | ||
address contractOwner | ||
) | ||
public | ||
ERC20('Ocean Token', 'OCEAN') | ||
ERC20Capped(TOTALSUPPLY) | ||
Ownable() | ||
{ | ||
transferOwnership(contractOwner); | ||
} | ||
|
||
function mint(address to, uint256 amount) external onlyOwner { | ||
_mint(to, amount); | ||
} | ||
|
||
|
||
/** | ||
* @dev fallback function | ||
* this is a default fallback function in which receives | ||
* the collected ether. | ||
*/ | ||
fallback() external payable {revert('Invalid ether transfer');} | ||
|
||
/** | ||
* @dev receive function | ||
* this is a default receive function in which receives | ||
* the collected ether. | ||
*/ | ||
receive() external payable {revert('Invalid ether transfer');} | ||
|
||
|
||
} |
Check warning
Code scanning / Slither
Too many digits
|
||
// keep track token holders | ||
address[] private accounts = new address[](0); | ||
mapping(address => bool) private tokenHolders; |
Check warning
Code scanning / Slither
Unused state variable
uint256 TOTALSUPPLY = CAP.mul(uint256(10) ** DECIMALS); | ||
|
||
// keep track token holders | ||
address[] private accounts = new address[](0); |
Check warning
Code scanning / Slither
Unused state variable
|
||
uint8 constant DECIMALS = 18; | ||
uint256 constant CAP = 1410000000; | ||
uint256 TOTALSUPPLY = CAP.mul(uint256(10) ** DECIMALS); |
Check warning
Code scanning / Slither
State variables that could be declared constant
Closes #683
Changes proposed in this PR: