Blockwell

SushiToken

ERC20

This contract is an ERC20 token.

Name SushiToken
Symbol SUSHI
Decimals 18
Total Supply 140,544,630 SUSHI

About link

SushiSwap (SUSHI) is a cryptocurrency token and operates on the Ethereum platform. SushiSwap has a current supply of 122,284,773.056. The last known price of SushiSwap is $1.29 USD and is up 2.16% over the last 24 hours. It is currently trading on 100 active market(s) with $56,362,764.233 traded over the last 24 hours. More information can be found at https://sushiswap.org/.

Stats

Public Functions 20
Event Types 5
Code Size 37,741 bytes

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

DelegateChanged Event

Parameters help
delegator
address help
fromDelegate
address help
toDelegate
address help

DelegateVotesChanged Event

Parameters help
delegate
address help
previousBalance
uint help
newBalance
uint help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Checkpoint Event

Members
fromBlock
uint32 help
votes
uint256 help

Functions Expand All Collapse All

owner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function owner() public view returns (address) {
        return _owner;
    }

renounceOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

transferOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

name keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function name() public view returns (string memory) {
        return _name;
    }

symbol keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function symbol() public view returns (string memory) {
        return _symbol;
    }

decimals keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function decimals() public view returns (uint8) {
        return _decimals;
    }

totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

balanceOf keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

transfer keyboard_arrow_up

Parameters help

Name Type
recipient
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

allowance keyboard_arrow_up

Parameters help

Name Type
owner
address help
spender
address help

Properties

Visibility help public
Mutability help view
Source Code
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

approve keyboard_arrow_up

Parameters help

Name Type
spender
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

transferFrom keyboard_arrow_up

Parameters help

Name Type
sender
address help
recipient
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

increaseAllowance keyboard_arrow_up

Parameters help

Name Type
spender
address help
addedValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

decreaseAllowance keyboard_arrow_up

Parameters help

Name Type
spender
address help
subtractedValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
        _moveDelegates(address(0), _delegates[_to], _amount);
    }

delegates keyboard_arrow_up

Parameters help

Name Type
delegator
address help

Properties

Visibility help public
Mutability help view
Source Code
    function delegates(address delegator)
        external
        view
        returns (address)
    {
        return _delegates[delegator];
    }

delegate keyboard_arrow_up

Parameters help

Name Type
delegatee
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function delegate(address delegatee) external {
        return _delegate(msg.sender, delegatee);
    }

delegateBySig keyboard_arrow_up

Parameters help

Name Type
delegatee
address help
nonce
uint help
expiry
uint help
v
uint8 help
r
bytes32 help
s
bytes32 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function delegateBySig(
        address delegatee,
        uint nonce,
        uint expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    )
        external
    {
        bytes32 domainSeparator = keccak256(
            abi.encode(
                DOMAIN_TYPEHASH,
                keccak256(bytes(name())),
                getChainId(),
                address(this)
            )
        );

        bytes32 structHash = keccak256(
            abi.encode(
                DELEGATION_TYPEHASH,
                delegatee,
                nonce,
                expiry
            )
        );

        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                domainSeparator,
                structHash
            )
        );

        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "SUSHI::delegateBySig: invalid signature");
        require(nonce == nonces[signatory]++, "SUSHI::delegateBySig: invalid nonce");
        require(now <= expiry, "SUSHI::delegateBySig: signature expired");
        return _delegate(signatory, delegatee);
    }

getCurrentVotes keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
    function getCurrentVotes(address account)
        external
        view
        returns (uint256)
    {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

getPriorVotes keyboard_arrow_up

Parameters help

Name Type
account
address help
blockNumber
uint help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
    function getPriorVotes(address account, uint blockNumber)
        external
        view
        returns (uint256)
    {
        require(blockNumber < block.number, "SUSHI::getPriorVotes: not yet determined");

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }