scrollICO.sol

Type: Upgradeable (UUPS)

Description: Implements a token sale mechanism where users deposit USDC and receive AIBTC tokens at a configurable price.

External Dependencies

  • IERC20 (USDC)

  • IERC20 (AIBTC)

State Variables

Name
Type
Visibility
Description
Default

usdt

IERC20

public

Payment token

cerToken

IERC20

public

Token sold

saleActive

bool

public

Sale status

true

price_usdt

uint256

public

Price

10

totalDepositedUSDT

uint256

public

Total USDC collected

totalDistributedCER

uint256

public

Total AIBTC distributed

Function
Public
OnlyOwner
Notes

initialize

initializer modifier

deposit

Requires approve

setPrice

Price > 0

startSale

stopSale

withdrawUSDC

Multiplies by 1e6

withdrawCER

Multiplies by 1e18

_authorizeUpgrade

UUPS control

Last updated