Contracts
Same in all Networks
SPLX Token
0xA26710B65D505b6f85ECB418b073A4A67586DEdD
veSPLX NFT
0x71DCdf11c1aD7a25c942F9E6c22B495b1F456F84
Split Router
0xb0C1921fA527d8E6c5a6CF743c4323C8ABbcC773
Contract methods
ERC20 Token Functions
name()
read
string
This function return the name of the token.
decimals()
read
uint8
This function return the decimal of the token.
symbol()
read
string
This function return the symbol of the token.
totalSupply()
read
uint256
This function returns the total supply of tokens.
balanceOf(address account)
read
uint256
This function returns the token balance of a specified account.
allowance(address owner, address spender)
read
uint256
This function returns the allowance granted by a token owner to a spender.
transfer(address recipient, uint256 amount)
write
bool
This function transfers tokens from the sender's account to the recipient's account.
transferFrom(address sender, address recipient, uint256 amount)
write
bool
This function allows a spender to transfer tokens on behalf of the token owner.
approve(address spender, uint256 amount)
write
bool
This function allows a spender to spend tokens from the sender's account.
increaseAllowance(address spender, uint256 addedValue)
write
bool
This function increases the allowance of a spender.
decreaseAllowance(address spender, uint256 subtractedValue)
write
bool
This function decreases the allowance of a spender.
burn(uint256 amount)
write
bool
This function burns (destroys) tokens from the sender's account.
Bridge Transfer Functions
bridgeTransfer(address recipient, uint256 amount, uint256 destChainID)
write (payable)
bool
This function allows the sender to burn tokens and send them to another chain for bridging. It emits the BridgeTransferSent event and uses the ICallProxy contract to initiate the bridging process.
bridgeTransferFrom(address sender, address recipient, uint256 amount, uint256 destChainID)
write (payable)
bool
This function is similar to bridgeTransfer, but it allows the router contract to initiate the transfer on behalf of a sender. It also checks and updates the allowance of the spender.
veSPLX Functions
deposit(uint256 amount, uint256 lockTimestampID, address token)
write
void
The deposit function allows a user to deposit tokens into the contract for staking. It requires the token to be allowed for staking, a non-zero amount, and a valid lockTimestampID. The function calculates the veShare based on the lockTimestampID and token amount and mints a new ERC721 token representing the allocation.
withdraw(uint256 tokenId)
write
void
The withdraw function allows a user to withdraw their tokens from the contract after the lock period has expired. It requires the caller to be the owner of the token and the allocation to be expired. The function burns the ERC721 token and transfers the tokens back to the user.
claimerOf(uint256 tokenId)
read
address
It returns the claimer (recipient) of a specific token allocation.
viewAllocation(uint256 tokenId)
read
(uint256, uint256, uint256, address)
It returns the details of a specific token allocation (amount, veShare, unlockTimestamp, token).
viewAllocations(address user, uint256 startID, uint256 len)
read
uint256[]
It returns an array of token IDs owned by a user, starting from a given startID and up to the specified length.
isAllocationExpired(uint256 tokenId)
read
bool
It checks if a specific token allocation has expired.
ERC721 Token Functions
balanceOf(address owner)
read
uint256
Returns the number of tokens owned by the owner.
ownerOf(uint256 tokenId)
read
address
Returns the owner of the tokenId token.
safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data)
write
void
Safely transfers the tokenId token from from to to with additional data.
safeTransferFrom(address from, address to, uint256 tokenId)
write
void
Safely transfers the tokenId token from from to to.
transferFrom(address from, address to, uint256 tokenId)
write
void
Transfers the tokenId token from from to to.
approve(address to, uint256 tokenId)
write
void
Grants permission to to to transfer the tokenId token.
setApprovalForAll(address operator, bool _approved)
write
void
Approves or removes operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller.
getApproved(uint256 tokenId)
read
address
Returns the account approved for the tokenId token.
isApprovedForAll(address owner, address operator)
read
bool
Returns if the operator is allowed to manage all of the assets of owner.
Structs
The contract defines a struct called Allocation, which represents a token Allocation made by a user. It includes the amount, veShare (voting escrow share), unlock timestamp, and token address
struct Allocation {
uint256 amount;
uint256 veShare;
uint256 unlockTimestamp;
address token;
}Last updated