Add system contract to convert tinybars to/from tinycents at active exchange rate #474
tinker-michaelj
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
Suppose a contract aspires to be "self-funding"---that is, it expects users to send enough
msg.value
with function calls to cover the contract's Hedera fees.The challenge is that although Hedera fees are fixed and predictable, they are denominated in tinycents (USD); but
msg.value
is denominated in tinybars. So the contract needs to convert from tinycents to tinybars, at the same exchange rate the network will use when charging fees.Proposed solution
Add an EVM system contract at address
0x168
that implements the following interface,Beta Was this translation helpful? Give feedback.
All reactions