f-o-a-m / kepler

A Haskell framework that facilitates writing ABCI applications
https://kepler.dev
Apache License 2.0
34 stars 10 forks source link

Make Gas checker antehandler #191

Open martyall opened 4 years ago

martyall commented 4 years ago

there's a gas field in the raw transaction which says how much gas the user watns to spend

then somewhere in the application global settings/config there gas cost parameter (where gas cost is in Coin ~ (CoinType, Amount)

the gas checker needs to make sure that the user has enough "gas money" to pay for potentially using all the gas requested.

At the end of the transaction, the gas checker will debit the account (but where does it go?)

Things to figure out: