AVATAR (AVA) Whitepaper

v1.0.0

Transparent Token Economy with On-Chain Vesting

TokenAVATAR
SymbolAVA
Supply10,000,000,000
StandardERC-20
NetworkSepolia

12. Contract API Reference

Proxy Address 기준 호출

모든 함수는 Proxy 주소를 통해 호출합니다.
AVAToken: 0x3aDBb3f9F9f8F9A77E4CfA100a3C197488e7ACD5
AVAVesting: 0x1a4bDdBFe0C0a4e8681d067A4a100a4760aeC95D

12.1 AVAToken — Owner Functions (ByOwner)

setVestingContractByOwner

setVestingContractByOwner(address _vesting)

AVAVesting 프록시 주소를 등록합니다. 1회만 호출 가능하며, 설정 후 변경 불가합니다.

ParameterTypeDescription
_vestingaddressAVAVesting 프록시 주소

Role: DEFAULT_ADMIN_ROLE (Owner)  |  Revert: VestingContractAlreadySet, ZeroAddress

burnByAdmin

burnByAdmin(address from, uint256 amount, VestingGroup group)

그룹별 조건에 따라 토큰을 소각합니다. AVAVesting의 validateBurnadjustForBurn 순서로 검증 후 실행됩니다.

ParameterTypeDescription
fromaddress소각 대상 지갑 주소
amountuint256소각 수량 (wei)
groupVestingGroup소각 대상 그룹 (enum 0~6)

Role: ADMIN_BURNER_ROLE  |  Event: TokensBurned(from, amount, group)

pauseByOwner / unpauseByOwner

pauseByOwner()
unpauseByOwner()

모든 토큰 전송을 일시 중지/재개합니다. 긴급 상황 시 사용합니다.

Role: OWNER_PAUSER_ROLE

12.2 AVAToken — Transfer Functions

transfer

transfer(address to, uint256 amount) → bool

ERC-20 표준 전송. 사용 가능한 잔액(Available Balance) 범위 내에서만 전송 가능합니다. 잠긴(Locked) 토큰은 전송할 수 없습니다.

ParameterTypeDescription
toaddress수신자 주소
amountuint256전송 수량 (wei)

Role: 없음 (누구나)  |  Revert: InsufficientAvailableBalance

transferFrom

transferFrom(address from, address to, uint256 amount) → bool

ERC-20 위임 전송. approve로 승인된 범위 내에서 제3자가 전송합니다. Available Balance 제한 동일 적용.

ParameterTypeDescription
fromaddress토큰 보유자 주소
toaddress수신자 주소
amountuint256전송 수량 (wei)

Role: 없음 (approve 필요)  |  Revert: InsufficientAvailableBalance

approve

approve(address spender, uint256 amount) → bool

ERC-20 표준 승인. 제3자(spender)가 지정 수량까지 transferFrom으로 전송할 수 있도록 허용합니다.

Role: 없음 (누구나)  |  Event: Approval(owner, spender, amount)

executeVestingTransfer

executeVestingTransfer(address from, address to, uint256 amount)

베스팅 전용 내부 전송. Available Balance 검사를 우회하여 잠긴 토큰을 이동합니다. AVAVesting 컨트랙트만 호출 가능합니다.

ParameterTypeDescription
fromaddress송신자 주소
toaddress수신자 주소
amountuint256전송 수량 (wei)

Role: AVAVesting 컨트랙트만 (내부 호출)  |  Revert: VestingTransferOnly

12.3 AVAToken — View Functions

FunctionParametersReturnsDescription
balanceOf(address)accountuint256전체 토큰 잔액 (잠긴 토큰 포함)
totalSupply()없음uint256총 발행량 (10,000,000,000 AVA)
getAvailableBalance(address)accountuint256사용 가능한 잔액 (전송/거래 가능한 수량)
getLockedBalance(address)accountuint256잠긴 잔액 (아직 해제되지 않은 베스팅 수량)
getVestingContract()없음address연결된 AVAVesting 프록시 주소
allowance(address,address)owner, spenderuint256승인된 위임 전송 수량
name()없음string토큰 이름 ("AVATAR")
symbol()없음string토큰 심볼 ("AVA")
decimals()없음uint8소수점 자릿수 (18)
version()없음string컨트랙트 버전 ("1.0.0")
getImplementation()없음address현재 Implementation 주소 (ERC-1967)
paused()없음bool일시 중지 상태 여부
cast 조회 예시
# 사용 가능 잔액 조회
cast call $TOKEN_PROXY "getAvailableBalance(address)(uint256)" $WALLET --rpc-url $RPC_URL

# 버전 조회
cast call $TOKEN_PROXY "version()(string)" --rpc-url $RPC_URL

12.4 AVAVesting — Admin Functions (ByAdmin)

setGroupConfigByAdmin

setGroupConfigByAdmin(
    VestingGroup group,
    address groupWallet,
    uint256 totalAllocation,
    uint256 initialUnlock,
    uint256 cliffDuration,
    uint256 vestingDuration,
    StartTimeMode startTimeMode
)

그룹별 베스팅 설정을 등록합니다. 1회만 호출 가능하며, cliff/vesting은 일(day) 단위 정렬 필수 (max 3,650일).

ParameterTypeDescription
groupVestingGroup그룹 enum (0:Foundation ~ 6:VC)
groupWalletaddress그룹 대표 지갑 주소
totalAllocationuint256총 배분량 (wei)
initialUnlockuint256TGE 시 즉시 해제량 (wei)
cliffDurationuint256클리프 기간 (초, 86400 배수)
vestingDurationuint256베스팅 기간 (초, 86400 배수)
startTimeModeStartTimeMode0: TGE 기준, 1: TransferTime 기준

Role: ADMIN_VESTING_MANAGER_ROLE  |  Event: GroupConfigSet(...)

setTGETimestampByAdmin

setTGETimestampByAdmin(uint256 timestamp)

TGE(Token Generation Event) 시점을 설정합니다. 1회만 호출 가능하며, 과거 90일 ~ 미래 365일 범위만 허용.

ParameterTypeDescription
timestampuint256TGE Unix 타임스탬프 (초)

Role: ADMIN_VESTING_MANAGER_ROLE  |  Event: TGETimestampSet(timestamp)

distributeToGroupByAdmin

distributeToGroupByAdmin(VestingGroup group, address from, uint256 amount)

Deployer에서 그룹 지갑으로 토큰을 배분하고 초기 베스팅 스케줄을 생성합니다. 그룹당 1회만 호출 가능.

ParameterTypeDescription
groupVestingGroup대상 그룹 enum
fromaddress토큰 보유자 (deployer) 주소
amountuint256배분 수량 (wei, totalAllocation과 일치)

Role: ADMIN_VESTING_MANAGER_ROLE  |  Event: GroupDistributed(group, wallet, amount)

vestingTransferByAdmin

vestingTransferByAdmin(
    VestingGroup group,
    address from,
    address to,
    uint256 amount,
    uint256 scheduleIndex
)

잠긴 토큰을 베스팅 조건과 함께 다른 지갑으로 전송합니다. 수신자는 cliff/vesting 조건을 상속받으며, initialUnlock은 상속되지 않습니다.

ParameterTypeDescription
groupVestingGroup대상 그룹 enum
fromaddress송신자 주소 (잠긴 토큰 보유자)
toaddress수신자 주소
amountuint256전송 수량 (wei, 잠긴 토큰 범위 내)
scheduleIndexuint256송신자의 베스팅 스케줄 인덱스

Role: ADMIN_VESTING_MANAGER_ROLE  |  Event: VestingTransferExecuted(group, from, to, amount, startTime)

groupWalletTransferByAdmin

groupWalletTransferByAdmin(VestingGroup group, address to, uint256 amount)

그룹 지갑에서 외부 지갑으로 자유잔액(해제된 토큰)을 전송합니다. 그룹 지갑은 일반 transfer가 차단되어 이 함수를 통해서만 전송 가능합니다.

ParameterTypeDescription
groupVestingGroup대상 그룹 enum
toaddress수신자 주소
amountuint256전송 수량 (wei, 자유잔액 범위 내)

Role: ADMIN_VESTING_MANAGER_ROLE  |  Event: GroupWalletTransferExecuted(group, from, to, amount)

pauseByOwner / unpauseByOwner

pauseByOwner()
unpauseByOwner()

모든 베스팅 작업(distributeToGroupByAdmin, vestingTransferByAdmin, groupWalletTransferByAdmin)을 일시 중지/재개합니다.

Role: OWNER_PAUSER_ROLE

12.5 AVAVesting — View Functions

FunctionParametersReturnsDescription
getAvailableBalance(address)accountuint256사용 가능 잔액 (balanceOf - totalLocked)
getLockedBalance(address)accountuint256잠긴 잔액 (미해제 베스팅 토큰 합계)
getUnlockedBalance(address)accountuint256해제된 잔액 (시간 경과로 해제된 토큰 합계)
getVestingSchedules(address)accountWalletVesting[]지갑의 전체 베스팅 스케줄 배열
getGroupConfig(VestingGroup)groupGroupConfig그룹 베스팅 설정 구조체
getTGETimestamp()없음uint256TGE 타임스탬프 (0이면 미설정)
getTokenContract()없음address연결된 AVAToken 프록시 주소
isGroupWallet(address)accountbool그룹 지갑 여부 조회
version()없음string컨트랙트 버전 ("1.0.0")
getImplementation()없음address현재 Implementation 주소 (ERC-1967)
paused()없음bool일시 중지 상태 여부
cast 조회 예시
# 베스팅 스케줄 조회
cast call $VESTING_PROXY "getVestingSchedules(address)" $WALLET --rpc-url $RPC_URL

# 그룹 설정 조회 (0=Foundation, 1=Ecosystem, ...)
cast call $VESTING_PROXY "getGroupConfig(uint8)" 0 --rpc-url $RPC_URL

# TGE 타임스탬프 조회
cast call $VESTING_PROXY "getTGETimestamp()(uint256)" --rpc-url $RPC_URL

12.6 Access Control Functions

OpenZeppelin AccessControl 상속. 양쪽 컨트랙트에서 동일하게 사용 가능합니다.

FunctionParametersDescription
grantRole(bytes32, address)role, account역할 부여 (admin만 가능)
revokeRole(bytes32, address)role, account역할 회수 (admin만 가능)
renounceRole(bytes32, address)role, callerAddress본인 역할 포기
hasRole(bytes32, address)role, account역할 보유 여부 조회 (view)
getRoleAdmin(bytes32)role해당 역할의 관리 역할 조회 (view)

12.7 Role Constants

RoleCategoryValue사용 컨트랙트권한
DEFAULT_ADMIN_ROLEOwner0x00Token, Vesting모든 역할 관리, 초기 설정
OWNER_PAUSER_ROLEOwnerkeccak256("OWNER_PAUSER_ROLE")Token, VestingpauseByOwner / unpauseByOwner
OWNER_UPGRADER_ROLEOwnerkeccak256("OWNER_UPGRADER_ROLE")Token, VestingUUPS 업그레이드 실행
ADMIN_VESTING_MANAGER_ROLEAdminkeccak256("ADMIN_VESTING_MANAGER_ROLE")Vesting그룹 설정, TGE, 배분, 베스팅 전송, 그룹지갑 전송
ADMIN_BURNER_ROLEAdminkeccak256("ADMIN_BURNER_ROLE")Token조건부 토큰 소각

12.8 Data Types

VestingGroup (enum)

ValueNameAllocation
0Foundation25%
1Ecosystem20%
2Marketing15%
3Liquidity15%
4TeamAdvisor10%
5Partnership5%
6VC10%

StartTimeMode (enum)

ValueNameDescription
0TGETGE 타임스탬프 기준으로 베스팅 시작
1TransferTimevestingTransferByAdmin 시점 기준으로 베스팅 시작

GroupConfig (struct)

FieldTypeDescription
groupWalletaddress그룹 대표 지갑 주소
totalAllocationuint256총 배분량 (wei)
initialUnlockuint256TGE 즉시 해제량 (wei)
cliffDurationuint256클리프 기간 (초)
vestingDurationuint256베스팅 기간 (초)
startTimeModeStartTimeMode베스팅 시작 기준 (TGE/TransferTime)
isConfiguredbool설정 완료 여부

WalletVesting (struct)

FieldTypeDescription
groupVestingGroup소속 그룹
totalAmountuint256총 베스팅 수량 (wei)
initialUnlockuint256즉시 해제량 (wei)
startTimeuint256베스팅 시작 시점 (unix)
cliffDurationuint256클리프 기간 (초)
vestingDurationuint256베스팅 기간 (초)
© 2026 AVA Labs