mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-30 19:33:36 +00:00
6a4e312eac
We have additional logic for getting BaseExecFee policy value. This logic should be moved to interop context instead of being in Policer, because Policer is just an interface over Policy contract. After moving this logic to interop context, we need to use it to define BaseExecFee instead of (Policer).BaseExecFee. Thus, moving (*Blockchain).GetPrice to (*Context).GetPrice is necessary.
11 lines
307 B
Go
11 lines
307 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)
|
|
}
|