Skip to content

Commit

Permalink
Merge pull request #695 from CosmWasm/account_for_gas
Browse files Browse the repository at this point in the history
Improve code and testing around external gas usage
  • Loading branch information
webmaster128 authored Jan 6, 2021
2 parents 8e6ac11 + cf8ebe0 commit 3b0797e
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 181 deletions.
7 changes: 7 additions & 0 deletions packages/vm/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ pub struct GasInfo {
}

impl GasInfo {
pub fn new(cost: u64, externally_used: u64) -> Self {
GasInfo {
cost,
externally_used,
}
}

pub fn with_cost(amount: u64) -> Self {
GasInfo {
cost: amount,
Expand Down
Loading

0 comments on commit 3b0797e

Please sign in to comment.