File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,11 @@ type Precompile struct {
3636// It uses the method ID to determine if the input is a transaction or a query and
3737// uses the Cosmos SDK gas config flat cost and the flat per byte cost * len(argBz) to calculate the gas.
3838func (p Precompile ) RequiredGas (input []byte , isTransaction bool ) uint64 {
39- argsBz := input [4 :]
40-
4139 if isTransaction {
42- return p .KvGasConfig .WriteCostFlat + (p .KvGasConfig .WriteCostPerByte * uint64 (len (argsBz )))
40+ return p .KvGasConfig .WriteCostFlat + (p .KvGasConfig .WriteCostPerByte * uint64 (len (input )))
4341 }
4442
45- return p .KvGasConfig .ReadCostFlat + (p .KvGasConfig .ReadCostPerByte * uint64 (len (argsBz )))
43+ return p .KvGasConfig .ReadCostFlat + (p .KvGasConfig .ReadCostPerByte * uint64 (len (input )))
4644}
4745
4846// RunNativeAction prepare the native context to execute native action for stateful precompile,
You can’t perform that action at this time.
0 commit comments