Prathamesh Musale
322d6f188b
All checks were successful
Lint / Run flake8 on python integration tests (push) Successful in 2m4s
Lint / Run golangci-lint (push) Successful in 4m58s
Tests / test-rpc (push) Successful in 5m12s
Tests / test-importer (push) Successful in 18m51s
Tests / sdk_tests (push) Successful in 9m48s
Tests / test-unit (push) Successful in 6m51s
Part of https://www.notion.so/Set-constant-gas-price-in-laconicd-00b470964f0e4020b06153f0f2c9bcfb - Use custom KV store gas config (0 gas for KV store ops) for laconic module (auction, bond, registry) txs Reviewed-on: cerc-io/laconicd#146 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
21 lines
432 B
Go
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
|
|
}
|