Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,22 @@ bin-release/
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important
# information for Eclipse / Flash Builder.

# Node.js
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Hardhat
artifacts/
cache/
typechain-types/

# IDE
.vscode/
.idea/

# Environment
.env
.env.local
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 sonnyquinn24
Copyright (c) 2025 Sonny Ethan Quinn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
79 changes: 77 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,77 @@
# scripts-deploy.js
Deployment
# SEQ Token Deployment Scripts

A complete Hardhat-based development environment for deploying SEQ Token and ICO contracts with ES module support.

This repository contains smart contracts and deployment scripts for the SEQ Token ecosystem.

## Contracts

### SEQToken.sol
An ERC20 token contract that:
- Has the name "SEQ Token" and symbol "SEQ"
- Distributes tokens at deployment: 10% to owner, 90% to ICO contract
- Validates that neither owner nor ICO addresses are zero
- Inherits from OpenZeppelin's ERC20 implementation

### SEQICO.sol
A basic ICO contract that stores:
- Token contract address
- USDT and USDC contract addresses
- Price per token in ETH, USDT, and USDC

## Setup

1. Install dependencies:
```bash
npm install
```

2. Compile contracts:
```bash
npm run compile
```

**Note**: Compilation requires internet access to download Solidity compilers from `binaries.soliditylang.org`. In restricted environments, ensure this domain is accessible or configure your local Solidity compiler.

3. Run tests:
```bash
npm run test
```

## Deployment

Deploy the contracts to a network:

```bash
# Deploy with main script
npm run deploy

# Deploy with alternative script
npm run deploy-alt
```

Both scripts deploy:
1. SEQICO contract first (with dummy token address)
2. SEQToken contract with 500,000 total supply (10% to owner, 90% to ICO)
3. Print token balances for verification

## Configuration

Update the deployment scripts in `scripts/` directory to modify:
- Owner address
- USDT/USDC contract addresses
- Token prices
- Total supply amount

## Contract Details

- **Total Supply**: 500,000 SEQ tokens
- **Owner Allocation**: 10% (50,000 SEQ)
- **ICO Allocation**: 90% (450,000 SEQ)
- **Solidity Version**: ^0.8.26 (compatible with locally available compiler)
- **Module System**: ES Modules (type: "module")
- **License**: MIT

## Development Notes

This project has been configured to work with ES modules and modern Hardhat tooling. All scripts and tests use ES6 import/export syntax instead of CommonJS require/module.exports.
27 changes: 27 additions & 0 deletions contracts/SEQICO.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

contract SEQICO {
address public token;
address public usdtAddress;
address public usdcAddress;
uint256 public pricePerTokenETH;
uint256 public pricePerTokenUSDT;
uint256 public pricePerTokenUSDC;

constructor(
address _token,
address _usdtAddress,
address _usdcAddress,
uint256 _pricePerTokenETH,
uint256 _pricePerTokenUSDT,
uint256 _pricePerTokenUSDC
) {
token = _token;
usdtAddress = _usdtAddress;
usdcAddress = _usdcAddress;
pricePerTokenETH = _pricePerTokenETH;
pricePerTokenUSDT = _pricePerTokenUSDT;
pricePerTokenUSDC = _pricePerTokenUSDC;
}
}
19 changes: 19 additions & 0 deletions contracts/SEQToken.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract SEQToken is ERC20 {
constructor(
uint256 totalSupply,
address owner,
address ico
) ERC20("SEQ Token", "SEQ") {
require(owner != address(0), "Owner address cannot be zero");
require(ico != address(0), "ICO address cannot be zero");
uint256 ownerAmount = (totalSupply * 10) / 100; // 10%
uint256 icoAmount = totalSupply - ownerAmount; // 90%
_mint(owner, ownerAmount);
_mint(ico, icoAmount);
}
}
Loading