Skip to main content

JBV1TokenPaymentTerminal

Allows project owners to specify the v1 project token that they are willing to accept from holders in exchange for their v2 project token.

Code

https://github.com/jbx-protocol/juice-v1-token-payment-terminal/blob/main/contracts/JBV1TokenPaymentTerminal.sol

Addresses

Ethereum mainnet: ``

Ethereum rinkeby: ``

Interfaces

ContractDescription
IJBV1TokenPaymentTerminalGeneral interface for the methods in this contract that interact with the blockchain's state according to the protocol's rules.
IJBPaymentTerminalA standard for a contract where project can receive payments through.

Inheritance

ContractDescription
ERC165Introspection on interface adherance.

Constructor

/**
@param _projects A contract which mints ERC-721's that represent project ownership and transfers.
@param _directory A contract storing directories of terminals and controllers for each project.
@param _ticketBooth The V1 contract where tokens are stored.
*/
constructor(
IJBProjects _projects,
IJBDirectory _directory,
ITicketBooth _ticketBooth
) {
projects = _projects;
directory = _directory;
ticketBooth = _ticketBooth;
}
  • _projects is an IJBProjects contract which mints ERC-721's that represent project ownership and transfers.
  • _directory is an IJBDirectory contract storing directories of terminals and controllers for each project.
  • _ticketBooth is an ITicketBooth contract that stores project tokens in the v1 Juicebox protocol.

Events

NameData
Pay
  • uint256 indexed projectId
  • address payer
  • address beneficiary
  • uint256 amount
  • uint256 beneficiaryTokenCount
  • string memo
  • address caller
SetV1ProjectId
  • uint256 indexed projectId
  • uint256 indexed v1ProjectId
  • address caller
ReleaseV1Tokens
  • uint256 indexed projectId
  • uint256 indexed beneficiary
  • uint256 unclaimedBalance
  • uint256 claimedBalance
  • address caller

Modifiers

FunctionDefinition
isTerminalOf

Params

  • uint256 _projectId

Properties

FunctionDefinition
projects

Traits

  • immutable

Returns

directory

Traits

  • immutable

Returns

ticketBooth

Traits

  • immutable

Returns

v1ProjectIdOf

Params

  • uint256 _projectId

Returns

  • uint256
finalized

Params

  • uint256 _projectId

Returns

  • bool

Read

FunctionDefinition
acceptsToken

Params

  • address _token

Returns

  • bool flag
decimalsForToken

Params

  • address _token

Returns

  • uint256 decimals
currencyForToken

Params

  • address _token

Returns

  • uint256 currency
currentEthOverflowOf

Params

  • uint256 _projectId

Returns

  • uint256 ethOverflow
supportsInterface

Params

  • uint256 _interfaceId

Returns

  • bool

Write

FunctionDefinition
pay

Traits

  • payable

Params

  • uint256 _projectId
  • uint256 _amount
  • address _token
  • address _beneficiary
  • uint256 _minReturnedTokens
  • bool _preferClaimedTokens
  • string _memo
  • bytes _metadata

Returns

  • uint256 beneficiaryTokenCount
addToBalanceOf

Traits

  • payable

Params

  • uint256 _projectId
  • uint256 _amount
  • address _token
  • string _memo
setV1ProjectIdOf

Params

  • uint256 _projectId
  • uint256 _v1ProjectId
releaseV1TokensOf

Params

  • uint256 _v1ProjectId
  • address _beneficiary