mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 23:33:37 +00:00
13da1b62fb
It never changes during single execution, so we can cache it and avoid going to Policer via Chain for every instruction.
11 lines
305 B
Go
11 lines
305 B
Go
package interop
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/core/fee"
|
|
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
|
)
|
|
|
|
// GetPrice returns a price for executing op with the provided parameter.
|
|
func (ic *Context) GetPrice(op opcode.Opcode, parameter []byte) int64 {
|
|
return fee.Opcode(ic.baseExecFee, op)
|
|
}
|