Skip to main content

JBPrices

Manages and normalizes price feeds.

Code

https://github.com/jbx-protocol/juice-contracts-v3/blob/main/contracts/JBPrices.sol

Addresses

Ethereum mainnet: 0x63CF55ab55ABcaD4E84335B80bbE3D2DefA09410

Goerli testnet: 0x9f0eC91d28fFc54874e9fF11A316Ba2537aCD72C

Interfaces

NameDescription
IJBPricesGeneral interface for the methods in this contract that interact with the blockchain's state according to the protocol's rules.

Inheritance

ContractDescription
OwnableIncludes convenience functionality for checking a message sender's permissions before executing certain transactions.

Constructor

/**
@param _owner The address that will own the contract.
*/
constructor(address _owner) {
// Transfer the ownership.
transferOwnership(_owner);
}
  • _owner is the address that will own the contract.

Events

NameData
AddFeed
  • uint256 indexed currency
  • uint256 indexed base
  • IJBPriceFeed feed

Properties

FunctionDefinition
feedFor

Params

  • uint256 _currency
  • uint256 _base

Returns

Read

FunctionDefinition
priceFor

Params

  • uint256 _currency
  • uint256 _base
  • uint256 _decimals

Returns

  • uint256 price

Write

FunctionDefinition
addFeedFor

Traits

Params