Files
precompile/vrf/gas_zero_test.go

22 lines
552 B
Go

// Copyright (C) 2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package vrf
import (
"testing"
"github.com/luxfi/geth/common"
"github.com/luxfi/precompile/contract"
"github.com/stretchr/testify/require"
)
func TestGasZero_Rejected(t *testing.T) {
input := make([]byte, 128)
input[0] = OpVerify
_, remainingGas, err := VRFPrecompile.Run(nil, common.Address{}, ContractAddress, input, 0, true)
require.Error(t, err)
require.ErrorIs(t, err, contract.ErrOutOfGas)
require.Zero(t, remainingGas)
}