TLCV1
Alluvial Finance Inc.
TLC (v1)
The TLC token has a max supply of 1,000,000,000 and 18 decimal places.Upon deployment, all minted tokens are send to account provided at construction, in charge of creating the vesting schedulesThe contract is based on ERC20Votes by OpenZeppelin. Users need to delegate their voting power to someone or themselves to be able to vote.The contract contains vesting logics allowing vested users to still be able to delegate their voting power while their tokens are held in an escrow
Methods
CLOCK_MODE
Description of the clock
Returns
_0
string
undefined
DOMAIN_SEPARATOR
See {IERC20Permit-DOMAIN_SEPARATOR}.
Returns
_0
bytes32
undefined
allowance
See {IERC20-allowance}.
Parameters
owner
address
undefined
spender
address
undefined
Returns
_0
uint256
undefined
approve
See {IERC20-approve}. NOTE: If amount
is the maximum uint256
, the allowance is not updated on transferFrom
. This is semantically equivalent to an infinite approval. Requirements: - spender
cannot be the zero address.
Parameters
spender
address
undefined
amount
uint256
undefined
Returns
_0
bool
undefined
balanceOf
See {IERC20-balanceOf}.
Parameters
account
address
undefined
Returns
_0
uint256
undefined
checkpoints
Get the pos
-th checkpoint for account
.
Parameters
account
address
undefined
pos
uint32
undefined
Returns
_0
ERC20VotesUpgradeable.Checkpoint
undefined
clock
Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).
Returns
_0
uint48
undefined
computeVestingReleasableAmount
Computes the releasable amount of tokens for a vesting schedule.
Parameters
_index
uint256
index of the vesting schedule
Returns
_0
uint256
amount of releasable tokens
computeVestingVestedAmount
Computes the vested amount of tokens for a vesting schedule.
Parameters
_index
uint256
index of the vesting schedule
Returns
_0
uint256
amount of vested tokens
createVestingSchedule
Creates a new vesting scheduleThere may delay between the time a user should start vesting tokens and the time the vesting schedule is actually created on the contract.Typically a user joins the Liquid Collective but some weeks pass before the user gets all legal agreements in place and signed for thetoken grant emission to happen. In this case, the vesting schedule created for the token grant would start on the join date which is in the past.
As vesting schedules can be created in the past, this means that you should be careful when creating a vesting schedule and what duration parametersyou use as this contract would allow creating a vesting schedule in the past and even a vesting schedule that has already ended.
Parameters
_start
uint64
start time of the vesting
_cliffDuration
uint32
duration to vesting cliff (in seconds)
_duration
uint32
total vesting schedule duration after which all tokens are vested (in seconds)
_periodDuration
uint32
duration of a period after which new tokens unlock (in seconds)
_lockDuration
uint32
duration during which tokens are locked (in seconds)
_revocable
bool
whether the vesting schedule is revocable or not
_amount
uint256
amount of token attributed by the vesting schedule
_beneficiary
address
address of the beneficiary of the tokens
_delegatee
address
address to delegate escrow voting power to
_ignoreGlobalUnlockSchedule
bool
whether the vesting schedule should ignore the global lock
Returns
_0
uint256
index of the created vesting schedule
decimals
Returns the number of decimals used to get its user representation. For example, if decimals
equals 2
, a balance of 505
tokens should be displayed to a user as 5.05
(505 / 10 ** 2
). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for display purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
Returns
_0
uint8
undefined
decreaseAllowance
Atomically decreases the allowance granted to spender
by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - spender
cannot be the zero address. - spender
must have allowance for the caller of at least subtractedValue
.
Parameters
spender
address
undefined
subtractedValue
uint256
undefined
Returns
_0
bool
undefined
delegate
Delegate votes from the sender to delegatee
.
Parameters
delegatee
address
undefined
delegateBySig
Delegates votes from signer to delegatee
Parameters
delegatee
address
undefined
nonce
uint256
undefined
expiry
uint256
undefined
v
uint8
undefined
r
bytes32
undefined
s
bytes32
undefined
delegateVestingEscrow
Delegate vesting escrowed tokens
Parameters
_index
uint256
index of the vesting schedule
_delegatee
address
address to delegate the token to
Returns
_0
bool
True on success
delegates
Get the address account
is currently delegating to.
Parameters
account
address
undefined
Returns
_0
address
undefined
eip712Domain
See {EIP-5267}. Available since v4.9.
Returns
fields
bytes1
undefined
name
string
undefined
version
string
undefined
chainId
uint256
undefined
verifyingContract
address
undefined
salt
bytes32
undefined
extensions
uint256[]
undefined
getPastTotalSupply
Retrieve the totalSupply
at the end of timepoint
. Note, this value is the sum of all balances. It is NOT the sum of all the delegated votes! Requirements: - timepoint
must be in the past
Parameters
timepoint
uint256
undefined
Returns
_0
uint256
undefined
getPastVotes
Retrieve the number of votes for account
at the end of timepoint
. Requirements: - timepoint
must be in the past
Parameters
account
address
undefined
timepoint
uint256
undefined
Returns
_0
uint256
undefined
getVestingSchedule
Get vesting schedule
The vesting schedule structure represents a static configuration used to compute the desiredvesting details of a beneficiary at all times. The values won't change even after tokens are released.The only dynamic field of the structure is end, and is updated whenever a vesting schedule is revoked
Parameters
_index
uint256
Index of the vesting schedule
Returns
_0
VestingSchedulesV2.VestingSchedule
undefined
getVestingScheduleCount
Get count of vesting schedules
Returns
_0
uint256
count of vesting schedules
getVotes
Gets the current votes balance for account
Parameters
account
address
undefined
Returns
_0
uint256
undefined
increaseAllowance
Atomically increases the allowance granted to spender
by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - spender
cannot be the zero address.
Parameters
spender
address
undefined
addedValue
uint256
undefined
Returns
_0
bool
undefined
initTLCV1
Initializes the TLC Token
Parameters
_account
address
The initial account to grant all the minted tokens
isGlobalUnlockedScheduleIgnored
Get vesting global unlock schedule activation status for a vesting schedule
Parameters
_index
uint256
Index of the vesting schedule
Returns
_0
bool
true if the vesting schedule should ignore the global unlock schedule
migrateVestingSchedules
Migrates the vesting schedule state structures
name
Returns the name of the token.
Returns
_0
string
undefined
nonces
See {IERC20Permit-nonces}.
Parameters
owner
address
undefined
Returns
_0
uint256
undefined
numCheckpoints
Get number of checkpoints for account
.
Parameters
account
address
undefined
Returns
_0
uint32
undefined
permit
See {IERC20Permit-permit}.
Parameters
owner
address
undefined
spender
address
undefined
value
uint256
undefined
deadline
uint256
undefined
v
uint8
undefined
r
bytes32
undefined
s
bytes32
undefined
releaseVestingSchedule
Release vesting scheduleWhen tokens are released from the escrow, the delegated address of the escrow will see its voting power decrease.The beneficiary has to make sure its delegation parameters are set properly to be able to use/delegate the voting power of its balance.
Parameters
_index
uint256
Index of the vesting schedule to release
Returns
_0
uint256
released amount
revokeVestingSchedule
Revoke vesting schedule
Parameters
_index
uint256
Index of the vesting schedule to revoke
_end
uint64
End date for the schedule
Returns
_0
uint256
amount returned to the vesting schedule creator
symbol
Returns the symbol of the token, usually a shorter version of the name.
Returns
_0
string
undefined
totalSupply
See {IERC20-totalSupply}.
Returns
_0
uint256
undefined
transfer
See {IERC20-transfer}. Requirements: - to
cannot be the zero address. - the caller must have a balance of at least amount
.
Parameters
to
address
undefined
amount
uint256
undefined
Returns
_0
bool
undefined
transferFrom
See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum uint256
. Requirements: - from
and to
cannot be the zero address. - from
must have a balance of at least amount
. - the caller must have allowance for from
's tokens of at least amount
.
Parameters
from
address
undefined
to
address
undefined
amount
uint256
undefined
Returns
_0
bool
undefined
vestingEscrow
Get the address of the escrow for a vesting schedule
Parameters
_index
uint256
Index of the vesting schedule
Returns
_0
address
address of the escrow
Events
Approval
Emitted when the allowance of a spender
for an owner
is set by a call to {approve}. value
is the new allowance.
Parameters
owner indexed
address
undefined
spender indexed
address
undefined
value
uint256
undefined
CreatedVestingSchedule
A new vesting schedule has been created
Parameters
index
uint256
Vesting schedule index
creator indexed
address
Creator of the vesting schedule
beneficiary indexed
address
Vesting beneficiary address
amount
uint256
Vesting schedule amount
DelegateChanged
Emitted when an account changes their delegate.
Parameters
delegator indexed
address
undefined
fromDelegate indexed
address
undefined
toDelegate indexed
address
undefined
DelegateVotesChanged
Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.
Parameters
delegate indexed
address
undefined
previousBalance
uint256
undefined
newBalance
uint256
undefined
DelegatedVestingEscrow
Vesting escrow has been delegated
Parameters
index
uint256
Vesting schedule index
oldDelegatee indexed
address
old delegatee
newDelegatee indexed
address
new delegatee
beneficiary indexed
address
vesting schedule beneficiary
EIP712DomainChanged
MAY be emitted to signal that the domain could have changed.
Initialized
Triggered when the contract has been initialized or reinitialized.
Parameters
version
uint8
undefined
ReleasedVestingSchedule
Vesting schedule has been released
Parameters
index
uint256
Vesting schedule index
releasedAmount
uint256
Amount of tokens released to the beneficiary
RevokedVestingSchedule
Vesting schedule has been revoked
Parameters
index
uint256
Vesting schedule index
returnedAmount
uint256
Amount of tokens returned to the creator
newEnd
uint256
New end timestamp after revoke action
Transfer
Emitted when value
tokens are moved from one account (from
) to another (to
). Note that value
may be zero.
Parameters
from indexed
address
undefined
to indexed
address
undefined
value
uint256
undefined
Errors
GlobalUnlockUnderlfow
Underflow in global unlock logic (should never happen)
InvalidRevokedVestingScheduleEnd
Attempt to revoke a vesting schedule with an invalid end parameter
InvalidVestingScheduleParameter
Invalid parameter for a vesting schedule
Parameters
msg
string
undefined
InvalidZeroAddress
The address is zero
Unauthorized
The operator is unauthorized for the caller
Parameters
caller
address
Address performing the call
UnsufficientVestingScheduleCreatorBalance
Vesting schedule creator has unsufficient balance to create vesting schedule
VestingScheduleIsLocked
The vesting schedule is locked
VestingScheduleNotFound
The VestingSchedule was not found
Parameters
index
uint256
vesting schedule index
VestingScheduleNotRevocable
The vesting schedule is not revocable
VestingScheduleNotRevocableInPast
Attempt to revoke a schedule in the past
ZeroReleasableAmount
No token to release
Last updated