BTB
/

UNCX Network V2

Token Lockerwebsite
UNCX Network locks tokens and LP tokens for a set time so the team or the holder cannot withdraw early. An agent can lock LP tokens with lockLPToken, read a user's locks, extend or split a lock, and withdraw after the unlock date.

What you can do

lock-lpLock LP tokens until a dateapprove the locker for the LP amount, read gFees(), then lockLPToken(lpToken, amount, unlockDate, referral, feeInEth, withdrawer, countryCode) with the native fee as value when feeInEth is true
withdraw-lockWithdraw a lock after its unlock datewithdraw(lockId, amount) from the withdrawer address; find lockIds with getUserLockForTokenAtIndex
extend-lockExtend a lockrelock(lockId, newUnlockDate) with the new unlock date in unix seconds
check-locksList a user's locksgetUserNumLockedTokens(user), then getUserLockedTokenAtIndex and getUserNumLocksForToken per token
Locked tokens cannot be withdrawn before the unlock date, and relocking is one way for the owner to lengthen it. Confirm the unlock date and withdrawer before paying the fee.
The locker contracts have owner-only functions (setFees, setMigrator, setDev, transferOwnership) that can change fees or where migrations go. The owner is an admin key, so check the owner before trusting the lock.
The lockers are built for Uniswap V2 style LP tokens. Locking an arbitrary token may not match the locker's assumptions.

Contracts

Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).
LockerV2 (LP locker)other on ethereum0x59d7D55DdC58494FbBbca29904f108ece82Ac7FB
write lockLPToken(address,uint256,uint256,address,bool,address,uint16)
Lock tokens (LP tokens for Uniswap V2 style pairs) until an unlock date. Arguments: token address, amount in its smallest unit, unlock date (unix seconds), referral address (zero for none), feeInEth (true to pay the fee in the chain's native coin sent as value, false to pay in the UNCX fee token), withdrawer (the address allowed to withdraw), countryCode (uint16, 0 for none). Approve the locker for the amount first. Fee amounts are in gFees().
write withdraw(uint256,uint256)
Withdraw tokens from a lock after its unlock date. Arguments: lockId, amount to withdraw.
write incrementLock(uint256,uint256)
Add more tokens to an existing lock. Arguments: lockId, amount. Approve the locker for the amount first.
write relock(uint256,uint256)
Extend a lock to a new unlock date. Arguments: lockId, new unlock date (unix seconds).
write splitLock(uint256,uint256)
Split part of a lock into a new lock. Arguments: lockId, amount to move. Fee rules apply; see gFees().
write transferLockOwnership(uint256,address)
Transfer a lock to a new owner. Arguments: lockId, new owner address.
read getNumLocksForToken(address)
Number of locks for a token (LP token) address.
read getUserNumLocksForToken(address,address)
Number of a user's locks for a given token. Arguments: user, token.
read getUserLockForTokenAtIndex(address,address,uint256)
A user's lock for a token by index. Arguments: user, token, index. Returns the lock record.
read getUserNumLockedTokens(address)
Number of different tokens a user has locked.
read getUserLockedTokenAtIndex(address,uint256)
Token address of a user's locked token by index. Arguments: user, index.
read gFees()
Current fee settings of the locker (fee amounts and fee token data). Read before locking.
LockerV2 (LP locker)other on base0xc4E637D37113192F4F1F060DaEbD7758De7F4131
write lockLPToken(address,uint256,uint256,address,bool,address,uint16)
Lock tokens (LP tokens for Uniswap V2 style pairs) until an unlock date. Arguments: token address, amount in its smallest unit, unlock date (unix seconds), referral address (zero for none), feeInEth (true to pay the fee in the chain's native coin sent as value, false to pay in the UNCX fee token), withdrawer (the address allowed to withdraw), countryCode (uint16, 0 for none). Approve the locker for the amount first. Fee amounts are in gFees().
write withdraw(uint256,uint256)
Withdraw tokens from a lock after its unlock date. Arguments: lockId, amount to withdraw.
write incrementLock(uint256,uint256)
Add more tokens to an existing lock. Arguments: lockId, amount. Approve the locker for the amount first.
write relock(uint256,uint256)
Extend a lock to a new unlock date. Arguments: lockId, new unlock date (unix seconds).
write splitLock(uint256,uint256)
Split part of a lock into a new lock. Arguments: lockId, amount to move. Fee rules apply; see gFees().
write transferLockOwnership(uint256,address)
Transfer a lock to a new owner. Arguments: lockId, new owner address.
read getNumLocksForToken(address)
Number of locks for a token (LP token) address.
read getUserNumLocksForToken(address,address)
Number of a user's locks for a given token. Arguments: user, token.
read getUserLockForTokenAtIndex(address,address,uint256)
A user's lock for a token by index. Arguments: user, token, index. Returns the lock record.
read getUserNumLockedTokens(address)
Number of different tokens a user has locked.
read getUserLockedTokenAtIndex(address,uint256)
Token address of a user's locked token by index. Arguments: user, index.
read gFees()
Current fee settings of the locker (fee amounts and fee token data). Read before locking.
LockerV2 (LP locker)other on bsc0x7229247bD5cf29FA9B0764Aa1568732be024084b
write lockLPToken(address,uint256,uint256,address,bool,address,uint16)
Lock tokens (LP tokens for Uniswap V2 style pairs) until an unlock date. Arguments: token address, amount in its smallest unit, unlock date (unix seconds), referral address (zero for none), feeInEth (true to pay the fee in the chain's native coin sent as value, false to pay in the UNCX fee token), withdrawer (the address allowed to withdraw), countryCode (uint16, 0 for none). Approve the locker for the amount first. Fee amounts are in gFees().
write withdraw(uint256,uint256)
Withdraw tokens from a lock after its unlock date. Arguments: lockId, amount to withdraw.
write incrementLock(uint256,uint256)
Add more tokens to an existing lock. Arguments: lockId, amount. Approve the locker for the amount first.
write relock(uint256,uint256)
Extend a lock to a new unlock date. Arguments: lockId, new unlock date (unix seconds).
write splitLock(uint256,uint256)
Split part of a lock into a new lock. Arguments: lockId, amount to move. Fee rules apply; see gFees().
write transferLockOwnership(uint256,address)
Transfer a lock to a new owner. Arguments: lockId, new owner address.
read getNumLocksForToken(address)
Number of locks for a token (LP token) address.
read getUserNumLocksForToken(address,address)
Number of a user's locks for a given token. Arguments: user, token.
read getUserLockForTokenAtIndex(address,address,uint256)
A user's lock for a token by index. Arguments: user, token, index. Returns the lock record.
read getUserNumLockedTokens(address)
Number of different tokens a user has locked.
read getUserLockedTokenAtIndex(address,uint256)
Token address of a user's locked token by index. Arguments: user, index.
read gFees()
Current fee settings of the locker (fee amounts and fee token data). Read before locking.
LockerV2 (LP locker)other on arbitrum0x63F4B2C082B1E0bbA38874567E053800379bF8D7
write lockLPToken(address,uint256,uint256,address,bool,address,uint16)
Lock tokens (LP tokens for Uniswap V2 style pairs) until an unlock date. Arguments: token address, amount in its smallest unit, unlock date (unix seconds), referral address (zero for none), feeInEth (true to pay the fee in the chain's native coin sent as value, false to pay in the UNCX fee token), withdrawer (the address allowed to withdraw), countryCode (uint16, 0 for none). Approve the locker for the amount first. Fee amounts are in gFees().
write withdraw(uint256,uint256)
Withdraw tokens from a lock after its unlock date. Arguments: lockId, amount to withdraw.
write incrementLock(uint256,uint256)
Add more tokens to an existing lock. Arguments: lockId, amount. Approve the locker for the amount first.
write relock(uint256,uint256)
Extend a lock to a new unlock date. Arguments: lockId, new unlock date (unix seconds).
write splitLock(uint256,uint256)
Split part of a lock into a new lock. Arguments: lockId, amount to move. Fee rules apply; see gFees().
write transferLockOwnership(uint256,address)
Transfer a lock to a new owner. Arguments: lockId, new owner address.
read getNumLocksForToken(address)
Number of locks for a token (LP token) address.
read getUserNumLocksForToken(address,address)
Number of a user's locks for a given token. Arguments: user, token.
read getUserLockForTokenAtIndex(address,address,uint256)
A user's lock for a token by index. Arguments: user, token, index. Returns the lock record.
read getUserNumLockedTokens(address)
Number of different tokens a user has locked.
read getUserLockedTokenAtIndex(address,uint256)
Token address of a user's locked token by index. Arguments: user, index.
read gFees()
Current fee settings of the locker (fee amounts and fee token data). Read before locking.
LockerV2 (LP locker)other on polygon0x939d71ADe0Bf94d3F8cf578413bF2a2f248BF58b
write lockLPToken(address,uint256,uint256,address,bool,address,uint16)
Lock tokens (LP tokens for Uniswap V2 style pairs) until an unlock date. Arguments: token address, amount in its smallest unit, unlock date (unix seconds), referral address (zero for none), feeInEth (true to pay the fee in the chain's native coin sent as value, false to pay in the UNCX fee token), withdrawer (the address allowed to withdraw), countryCode (uint16, 0 for none). Approve the locker for the amount first. Fee amounts are in gFees().
write withdraw(uint256,uint256)
Withdraw tokens from a lock after its unlock date. Arguments: lockId, amount to withdraw.
write incrementLock(uint256,uint256)
Add more tokens to an existing lock. Arguments: lockId, amount. Approve the locker for the amount first.
write relock(uint256,uint256)
Extend a lock to a new unlock date. Arguments: lockId, new unlock date (unix seconds).
write splitLock(uint256,uint256)
Split part of a lock into a new lock. Arguments: lockId, amount to move. Fee rules apply; see gFees().
write transferLockOwnership(uint256,address)
Transfer a lock to a new owner. Arguments: lockId, new owner address.
read getNumLocksForToken(address)
Number of locks for a token (LP token) address.
read getUserNumLocksForToken(address,address)
Number of a user's locks for a given token. Arguments: user, token.
read getUserLockForTokenAtIndex(address,address,uint256)
A user's lock for a token by index. Arguments: user, token, index. Returns the lock record.
read getUserNumLockedTokens(address)
Number of different tokens a user has locked.
read getUserLockedTokenAtIndex(address,uint256)
Token address of a user's locked token by index. Arguments: user, index.
read gFees()
Current fee settings of the locker (fee amounts and fee token data). Read before locking.
LockerV2 (LP locker)other on avalanche0x07DD74C2dF2bC4eB04cf8eDb2F695AA79Ba590Eb
write lockLPToken(address,uint256,uint256,address,bool,address,uint16)
Lock tokens (LP tokens for Uniswap V2 style pairs) until an unlock date. Arguments: token address, amount in its smallest unit, unlock date (unix seconds), referral address (zero for none), feeInEth (true to pay the fee in the chain's native coin sent as value, false to pay in the UNCX fee token), withdrawer (the address allowed to withdraw), countryCode (uint16, 0 for none). Approve the locker for the amount first. Fee amounts are in gFees().
write withdraw(uint256,uint256)
Withdraw tokens from a lock after its unlock date. Arguments: lockId, amount to withdraw.
write incrementLock(uint256,uint256)
Add more tokens to an existing lock. Arguments: lockId, amount. Approve the locker for the amount first.
write relock(uint256,uint256)
Extend a lock to a new unlock date. Arguments: lockId, new unlock date (unix seconds).
write splitLock(uint256,uint256)
Split part of a lock into a new lock. Arguments: lockId, amount to move. Fee rules apply; see gFees().
write transferLockOwnership(uint256,address)
Transfer a lock to a new owner. Arguments: lockId, new owner address.
read getNumLocksForToken(address)
Number of locks for a token (LP token) address.
read getUserNumLocksForToken(address,address)
Number of a user's locks for a given token. Arguments: user, token.
read getUserLockForTokenAtIndex(address,address,uint256)
A user's lock for a token by index. Arguments: user, token, index. Returns the lock record.
read getUserNumLockedTokens(address)
Number of different tokens a user has locked.
read getUserLockedTokenAtIndex(address,uint256)
Token address of a user's locked token by index. Arguments: user, index.
read gFees()
Current fee settings of the locker (fee amounts and fee token data). Read before locking.