Files
zeekayandHanzo Dev 191a825352 deps: take version and vms from their own modules
luxfi/node is being retired. The version, vms, vms/artifacts and
vms/types/fee packages it hosted now have permanent homes in
luxfi/version and luxfi/vm, so O-Chain imports them from there and no
longer depends on the node at all. luxfi/vm v1.3.17 needs Go 1.26.5.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-06 03:32:26 -07:00

24 lines
781 B
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package vm
import (
"github.com/luxfi/vm/vms/types/fee"
)
// gateUserTx refuses every caller — O-Chain accepts no user txs
// (operator observations arrive via consensus, not a mempool).
// Any service entry that exposes itself as user-callable MUST route
// through this gate so the refusal is explicit, not implicit.
func (vm *VM) gateUserTx() error {
if vm.feePolicy == nil {
return fee.ErrChainAcceptsNoUserTxs
}
return vm.feePolicy.ValidateFee(0, fee.NoUserTxPolicy{}.FeeAssetID())
}
// FeePolicy exposes the chain's declared fee policy for diagnostics
// and the boot-time Validate gate.
func (vm *VM) FeePolicy() fee.Policy { return vm.feePolicy }