laconicd-deprecated/utils/context.go
Prathamesh Musale ea30697b50
Some checks failed
Deploy Contract / deploy (pull_request) Successful in 1m25s
Build / build (pull_request) Successful in 2m25s
Tests / test-rpc (pull_request) Successful in 5m47s
Tests / test-importer (pull_request) Successful in 16m25s
Tests / test-unit (pull_request) Successful in 6m43s
Tests / sdk_tests (pull_request) Successful in 9m36s
Lint / Run golangci-lint (pull_request) Failing after 4m21s
Lint / Run flake8 on python integration tests (pull_request) Successful in 1m43s
Use custom KV store gas config for all laconic txs
2024-04-03 11:46:15 +05:30

21 lines
432 B
Go

package utils
import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
func CtxWithCustomKVGasConfig(ctx *sdk.Context) *sdk.Context {
updatedCtx := ctx.WithKVGasConfig(storetypes.GasConfig{
HasCost: 0,
DeleteCost: 0,
ReadCostFlat: 0,
ReadCostPerByte: 0,
WriteCostFlat: 0,
WriteCostPerByte: 0,
IterNextCostFlat: 0,
})
return &updatedCtx
}