Skip to content

Commit 8afdb91

Browse files
committed
refactor: return params.P256VerifyGas constant
1 parent 40a7714 commit 8afdb91

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libevm/precompiles/p256verify/p256verify.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import (
2424
"crypto/rand"
2525
"io"
2626
"math/big"
27+
28+
"github.com/ava-labs/libevm/params"
2729
)
2830

2931
// Precompile implements ECDSA verification on the P256 curve, as defined by
@@ -32,8 +34,10 @@ import (
3234
// [RIP-7212]: https://github.com/ethereum/RIPs/blob/1f55794f65caa4c4bb2b8d9bda7d713b8c734157/RIPS/rip-7212.md
3335
type Precompile struct{}
3436

35-
// RequiredGas always returns 3450.
36-
func (Precompile) RequiredGas([]byte) uint64 { return 3450 }
37+
// RequiredGas returns [params.P256VerifyGas].
38+
func (Precompile) RequiredGas([]byte) uint64 {
39+
return params.P256VerifyGas
40+
}
3741

3842
const inputLen = 160
3943

0 commit comments

Comments
 (0)