Advanced guide
This section introduce some advanced features of using DFKassa
Telegram Online Support
You can ask any questions at our Telegram Official Support Chat
TERC20
DFKassa provides a special Test ERC20 token (TERC20) to simplify your development in Goerli Testnet. You can easily mint it for your purposes at Goerli Etherscan Contract Interface. It also has it's own price at MockedSpotPriceAggregator so you can use auto to auto USD price estiamtion.
MockedSpotPriceAggregator
MockedSpotPriceAggregator is a special contract at Goerli Testnet that allows you mock prices for your own tokens to test functionality of auto prices detection. You can easily intract with it using Goerli Etherscan Contract Interface and setPrice function. When MockedSpotPriceAggregator is used to set a price for a token, next time only who has set the price can change it (so that's why you can be completely sure no one will play with TERC20 price).
TokenUsdOracle
TokenUsdOracle contract (deployed in testnets and mainnets, see Reference section to get addresses) simplifies USD token price calculation providing calcE18 and calcE2 method. Both of them accept token address and token amount to estimate total USD amount and both return 18-decimal and 2-decimal (in cents) USD price & amount. For native currency you can use zero address. It uses 1inchg spot price aggregator and Chainlink Data Feeds.
Check How amount is calculated for custom token when its amount is auto? out to get how it works