Cake
BNB Smart Chain ERC-20 Token0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82
Solidity v0.6.12+commit.27d51765
Fungible token following the ERC-20 standard.
Overview
Read Functions
Block #100,280,626 · just nowReturns the EIP-712 typehash used to sign and verify delegation messages.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 | The EIP-712 DELEGATION_TYPEHASH as a bytes32 value for hashing typed delegation data.✨ AI |
Gets the EIP-712 domain type hash used when building typed data for signature verification.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 | The EIP-712 DOMAIN_TYPEHASH as a bytes32 value used in domain separator hashing.✨ AI |
Return the remaining number of tokens that owner has approved for spender to transfer.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | Address that owns the tokens.✨ AI |
| spender | address | Address approved to spend tokens on behalf of the owner.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | Remaining allowance as a uint256 in the token's smallest units that spender may transfer from owner.✨ AI |
Returns the token balance of the specified account.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | Address to query the token balance for.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | The account's token balance as a uint256 value.✨ AI |
Return the checkpoint at a given index for an account, showing the block and vote balance.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | uint32 |
Returns
| Name | Type | Description |
|---|---|---|
| fromBlock | uint32 | fromBlock: Block number when the checkpoint was recorded.✨ AI |
| votes | uint256 | votes: Vote balance recorded at that checkpoint.✨ AI |
Returns the token's decimal precision used for user-facing balances and amounts.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | uint8 | The number of decimal places (uint8) the token uses for presenting balances and amounts.✨ AI |
Delegate votes from `msg.sender` to `delegatee`
Parameters
| Name | Type | Description |
|---|---|---|
| delegator | address | The address to get delegatee for |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Gets the current votes balance for `account`
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address to get votes balance |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | The number of current votes for `account` |
Returns the address of the contract owner.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The owner's address.✨ AI |
Determine the prior number of votes for an account as of a block number
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account to check |
| blockNumber | uint256 | The block number to get the vote balance at |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | The number of votes the account had as of the given block |
Returns the token's name as a human-readable string.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | string | The ERC-20 token name (e.g., "Cake Token") as a string.✨ AI |
Returns the current permit nonce for the given address.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | Current nonce for the address; increments each time a permit is used.✨ AI |
Return the number of checkpoints recorded for a given account.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint32 | The number of checkpoints recorded for the account (uint32).✨ AI |
Returns the address of the contract owner.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The address that currently holds owner privileges for this contract.✨ AI |
Get the token's symbol.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | string | The token's short symbol used by wallets and UIs, for example "CAKE".✨ AI |
Returns the total number of CakeToken tokens in existence.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | Total number of tokens in existence as a uint256 value.✨ AI |
Write Functions
Approve spender to transfer up to amount tokens from the caller's account.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| spender | address | Address authorized to spend tokens on behalf of the caller.✨ AI |
| amount | uint256 | Maximum token amount the spender is allowed to transfer.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the allowance was successfully set.✨ AI |
Decrease the caller's token allowance for a spender by a given amount.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| spender | address | Address that is approved to spend tokens on behalf of the caller.✨ AI |
| subtractedValue | uint256 | Amount of tokens to subtract from the current allowance.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the allowance was successfully decreased.✨ AI |
Delegate votes from `msg.sender` to `delegatee`
Parameters
| Name | Type | Description |
|---|---|---|
| delegatee | address | The address to delegate votes to |
Delegates votes from signatory to `delegatee`
Parameters
| Name | Type | Description |
|---|---|---|
| delegatee | address | The address to delegate votes to |
| nonce | uint256 | The contract state required to match the signature |
| expiry | uint256 | The time at which to expire the signature |
| v | uint8 | The recovery byte of the signature |
| r | bytes32 | Half of the ECDSA signature pair |
| s | bytes32 | Half of the ECDSA signature pair |
Increase the caller's token allowance for spender by addedValue.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| spender | address | Address authorized to spend the caller's tokens.✨ AI |
| addedValue | uint256 | Amount to add to the current allowance, in the token's smallest units.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the allowance was successfully increased.✨ AI |
Mints the specified amount of CakeToken to the caller and increases the total token supply.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| _to | address | |
| _amount | uint256 |
Mints the specified amount of CakeToken to the caller and increases the total token supply.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| amount | uint256 | Number of tokens to mint, expressed in the token's smallest unit (base units).✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the mint operation succeeded and tokens were created; otherwise false.✨ AI |
Permanently renounces ownership, leaving the contract without an owner and disabling owner-only functions.✨ AI
Transfer tokens from the caller to the recipient and update both balances.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| recipient | address | Address that will receive the tokens.✨ AI |
| amount | uint256 | Amount of tokens to transfer (in the token's smallest unit).✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the transfer succeeded.✨ AI |
Transfers tokens from sender to recipient using the caller's allowance.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| sender | address | Address to transfer tokens from.✨ AI |
| recipient | address | Address to receive the tokens.✨ AI |
| amount | uint256 | Amount of tokens to transfer, in the token's smallest unit.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the transfer succeeded.✨ AI |
Transfers ownership of the contract to the specified new owner address.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address | Address that will receive ownership rights for the contract.✨ AI |
Events
| Name | Type | Indexed | Description |
|---|---|---|---|
| owner | address | ✓ | |
| spender | address | ✓ | |
| value | uint256 |
An event thats emitted when an account changes its delegate
| Name | Type | Indexed | Description |
|---|---|---|---|
| delegator | address | ✓ | |
| fromDelegate | address | ✓ | |
| toDelegate | address | ✓ |
An event thats emitted when a delegate account's vote balance changes
| Name | Type | Indexed | Description |
|---|---|---|---|
| delegate | address | ✓ | |
| previousBalance | uint256 | ||
| newBalance | uint256 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| previousOwner | address | ✓ | |
| newOwner | address | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| from | address | ✓ | |
| to | address | ✓ | |
| value | uint256 |