diff --git a/packages/chain/mempool/mempool.go b/packages/chain/mempool/mempool.go index 53d684e477..c438444d37 100644 --- a/packages/chain/mempool/mempool.go +++ b/packages/chain/mempool/mempool.go @@ -545,7 +545,7 @@ func (mpi *mempoolImpl) shouldAddOffledgerRequest(req isc.OffLedgerRequest) erro governanceState := governance.NewStateAccess(mpi.chainHeadState) chainOwner := governanceState.ChainOwnerID() isGovRequest := req.SenderAccount().Equals(chainOwner) && req.CallTarget().Contract == governance.Contract.Hname() - if !isGovRequest { + if !isGovRequest || governanceState.DefaultGasPrice().Cmp(util.Big0) == 0 { return fmt.Errorf("no funds on chain") } } diff --git a/tools/wasp-cli/chain/accounts.go b/tools/wasp-cli/chain/accounts.go index 35f64ef567..69d1619059 100644 --- a/tools/wasp-cli/chain/accounts.go +++ b/tools/wasp-cli/chain/accounts.go @@ -140,6 +140,9 @@ func baseTokensForDepositFee(client *apiclient.APIClient, chain string) uint64 { feePolicyBytes := callGovView(governance.ViewGetFeePolicy.Name).Get(governance.ParamFeePolicyBytes) feePolicy := gas.MustFeePolicyFromBytes(feePolicyBytes) + if feePolicy.GasPerToken.HasZeroComponent() { + return 0 + } gasLimitsBytes := callGovView(governance.ViewGetGasLimits.Name).Get(governance.ParamGasLimitsBytes) gasLimits, err := gas.LimitsFromBytes(gasLimitsBytes)