[BLOCKED][Smart Contract] Integrate the exchange rate precompiled Hedera contract
Context
When we create a token, we must send a certain amount of HBARs to the precompiled contract. Currently that amount is hardcoded in the SDK and the SC smart contract simply forwards it to the precompiled contract
Description
When the HBAR to USD exchange rate changes a lot, the hardcoded amount becomes all of the sudden not enough, we need to change it and recompile the code. The problem is that the error message we receive only states "Contract_Revert", which is not enough to easily identify the source of the problem.
It would be great to integrate the exchange rate precompiled Hedera contract at address 0x168, so that the token creation Hedera fees (1 dollard : https://docs.hedera.com/hedera/networks/mainnet/fees) are calculated dynamically by the smart contract. By doing that, we will be able to return an error message easier to understand when the provided amount is not enough to perform the token creation operation.
https://hips.hedera.com/hip/hip-358
Precompile Gas Costs
demo : https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/hts-precompile/examples/token-create/TokenCreateContract.sol
question : https://github.com/hashgraph/hedera-smart-contracts/discussions/184
We cannot have a precompiled contract outside a smart contract
Removed due to backlog restructuring