Skip to content
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

Merged
merged 4 commits into from
Aug 30, 2022
Merged

Conversation

alexcos20
Copy link
Member

@alexcos20 alexcos20 commented Aug 26, 2022

Closes #683
Changes proposed in this PR:

  • deploy on goerli

Comment on lines +17 to +64
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

Contract locking ether found: Contract OceanToken (contracts/utils/OceanToken.sol#17-64) has payable functions: - OceanToken.fallback() (contracts/utils/OceanToken.sol#54) - OceanToken.receive() (contracts/utils/OceanToken.sol#61) But does not have a function to withdraw the ether
@@ -0,0 +1,64 @@
pragma solidity 0.8.12;

Check warning

Code scanning / Slither

Incorrect versions of Solidity

Pragma version0.8.12 (contracts/utils/OceanToken.sol#1) necessitates a version too recent to be trusted. Consider deploying with 0.6.12/0.7.6/0.8.7

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

Variable OceanToken.TOTALSUPPLY (contracts/utils/OceanToken.sol#23) is not in mixedCase
Comment on lines +17 to +64
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

OceanToken.slitherConstructorConstantVariables() (contracts/utils/OceanToken.sol#17-64) uses literals with too many digits: - CAP = 1410000000 (contracts/utils/OceanToken.sol#22)

// keep track token holders
address[] private accounts = new address[](0);
mapping(address => bool) private tokenHolders;

Check warning

Code scanning / Slither

Unused state variable

OceanToken.tokenHolders (contracts/utils/OceanToken.sol#27) is never used in OceanToken (contracts/utils/OceanToken.sol#17-64)
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

OceanToken.accounts (contracts/utils/OceanToken.sol#26) is never used in OceanToken (contracts/utils/OceanToken.sol#17-64)

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

OceanToken.TOTALSUPPLY (contracts/utils/OceanToken.sol#23) should be constant
@alexcos20 alexcos20 merged commit a61587a into main Aug 30, 2022
@alexcos20 alexcos20 deleted the feature/goerli_and_polygonedge branch August 30, 2022 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploy on Goerli
1 participant