跳到主要内容

JBToken

An ERC-20 token that can be used by a project in the JBTokenStore.

Code

https://github.com/jbx-protocol/juice-contracts-v2/blob/main/contracts/JBToken.sol

Interfaces

NameDescription
IJBTokenAllows this contract to be used by projects in the JBTokenStore.

Inheritance

ContractDescription
ERC20PermitGeneral token standard for fungible accounting.
OwnableIncludes convenience functionality for specifying an address that owns the contract, with modifiers that only allow access by the owner.

Constructor

/**
@param _name The name of the token.
@param _symbol The symbol that the token should be represented by.
*/
constructor(string memory _name, string memory _symbol)
ERC20(_name, _symbol) ERC20Permit(_name) {}
  • _name is the name of the token.
  • _symbol is the symbol that the token should be represented by.

Read

FunctionDefinition
decimals

Returns

  • uint256 totalSupply
totalSupply

Params

  • uint256 _projectId

Returns

  • uint256 totalSupply
balanceOf

Params

  • uint256 _projectId
  • address _account

Returns

  • uint256 balanceOf

Write

FunctionDefinition
mint

Traits

Params

  • uint256 _projectId
  • address _account
  • uint256 _amount
burn

Traits

Params

  • uint256 _projectId
  • address _account
  • uint256 _amount
approve

Params

  • uint256 _projectId
  • address _spender
  • uint256 _amount
transfer

Params

  • uint256 _projectId
  • address _to
  • uint256 _amount
transferFrom

Params

  • uint256 _projectId
  • address _from
  • address _to
  • uint256 _amount
transferOwnership

Traits

Params

  • address _newOwner