Skip to content

Commit

Permalink
Merge #1360
Browse files Browse the repository at this point in the history
1360: Enable transaction fees on mainnet r=janezpodhostnik a=janezpodhostnik

## Context

Fees will get turned on on mainnet soon. Currently they are both disabled and set to `0.0`. They need to be enabled (with this PR) during a spork. After that they can be set to non `0.0` when desired.

## Checks

I verified that:
- mainnet tx fees are really set to `0.0`
- having tx fees on and set to `0.0` doesn't lead to any unexpected problems (on the emulator)
- having tx fees on and set to `0.0` doesn't emit fee deduction events (see the [contract](https://github.com/onflow/flow-core-contracts/blob/51b4191ee4367dc33e868b91a32e9cdab98fd519/contracts/FlowServiceAccount.cdc#L65))


Co-authored-by: Janez Podhostnik <janez.podhostnik@gmail.com>
  • Loading branch information
bors[bot] and janezpodhostnik committed Sep 30, 2021
2 parents 4016fd6 + db05d67 commit 1113112
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/scaffold.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,10 +705,12 @@ func (fnb *FlowNodeBuilder) initFvmOptions() {
fvm.WithBlocks(blockFinder),
fvm.WithAccountStorageLimit(true),
}
if fnb.RootChainID == flow.Testnet || fnb.RootChainID == flow.Canary || fnb.RootChainID == flow.Mainnet {
fvm.WithTransactionFeesEnabled(true)
}
if fnb.RootChainID == flow.Testnet || fnb.RootChainID == flow.Canary {
vmOpts = append(vmOpts,
fvm.WithRestrictedDeployment(false),
fvm.WithTransactionFeesEnabled(true),
)
}
fnb.FvmOptions = vmOpts
Expand Down

0 comments on commit 1113112

Please sign in to comment.