Custom fee detector - #1284
Conversation
Signed-off-by: Michael Garber <michael.garber@hashgraph.com>
|
The system contract seems to provide info about the token keys already (see Is that enough for the use case you mention? |
| bool hasCustomFeeSchedule, | ||
| bool hasCustomFeeScheduleKey |
There was a problem hiding this comment.
Using booleans here, it seems like a contract might eagerly reject a token with a reasonable fee schedule. Better safe than sorry, but this might cause other issues for legitimate tokens.
That said, how much information is it appropriate to expose?
There was a problem hiding this comment.
@mgh14 A major concern I have is that a legitimate token with a reasonable custom fee schedule can be changed by the fee schedule key to become arbitrarily unreasonable, hence why I am looking for a boolean hasCustomFeeScheduleKey.
IHederaTokenService.sol does return the custom fee schedule, but the boolean would be helpful if the goal is to reject all custom fee tokens (https://github.com/hashgraph/hedera-smart-contracts/blob/2e7c67fe3e0306e660a767028dc2f61379033580/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol#L651)
@Neurone Unfortunately, here in the services codebase, contracts only "see" simple key types inside the EVM. This means if |
I see, right. What if we propose extending Also, I think you can get all the info about the current custom fees via the |
@Neurone Yes, I think extending |
|
@littletarzan may you DCO and GPG verify your commits? These checks are failing |
It looks like we are going in a different direction than I anticipated so Ii will just close the PR and try again with this new idea of exposing visibility into comple key types |
Description:
Related issue(s):
Fixes #
Notes for reviewer:
Checklist