File: BondingCurve.sol
51:     function getPriceData(
52:         uint256 credId_,
53:         uint256 supply_,
54:         uint256 amount_,
55:         bool isSign_
56:     )
57:         public
58:         view
59:         returns (uint256 price, uint256 protocolFee, uint256 creatorFee)
60:     {
61:         (uint16 buyShareRoyalty, uint16 sellShareRoyalty) = credContract.getCreatorRoyalty(credId_);
62: 
63:         price = isSign_ ? getPrice(supply_, amount_) : getPrice(supply_ - amount_, amount_);
64: 
65:       
66:         protocolFee = _getProtocolFee(price);
67:         
68:         if (supply_ == 0) {
69:             creatorFee = 0;
70:             return (price, protocolFee, creatorFee);
71:         }
72:         uint16 royaltyRate = isSign_ ? buyShareRoyalty : sellShareRoyalty;
73:         creatorFee = (price * royaltyRate) / RATIO_BASE;
74:     }
