Skip to content
2 changes: 1 addition & 1 deletion contracts/SEQICO.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ contract SEQICO is Ownable {

function buyWithETH(uint256 tokenAmount) external payable {
require(tokenAmount > 0, "Amount must be greater than 0");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

token amount $3.79

uint256 requiredETH = pricePerTokenETH * tokenAmount;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot fill in this info

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need clarification on what specific information you'd like me to add on line 40. Are you looking for:

  • A comment explaining the calculation formula?
  • Documentation about why we divide by 1e18?
  • Additional validation logic?

Please let me know what information you'd like me to fill in.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot correct and numbers that may be wrong

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot fix all errors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed syntax errors and corrected all incorrect numbers in the contract. Removed erroneous decimal values from variable declarations and constructor parameters, while preserving the ETH calculation fix. Commit: df8aae0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed syntax errors and corrected all incorrect numbers in the contract. Removed erroneous decimal values from variable declarations and constructor parameters, while preserving the ETH calculation fix. Commit: df8aae0

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fill in the values for eth, usdc, usdt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added example values for ETH, USDT, USDC pricing based on $3.79 token price. Created price-examples.js script showing calculations: ETH (0.001895), USDT (3790000), USDC (3790000). Added detailed documentation in the contract explaining each price variable. Commit: 34b2d00

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed all syntax issues and added comprehensive documentation for price calculations. Added detailed comments explaining the division by 1e18 and created example scripts showing how to set values for ETH, USDT, and USDC pricing. Commit: 34b2d00

uint256 requiredETH = pricePerTokenETH * tokenAmount / 1e18;
require(msg.value >= requiredETH, "Insufficient ETH sent");
require(seqToken.balanceOf(address(this)) >= tokenAmount, "Not enough SEQ tokens");

Expand Down
Loading