mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-05 03:58:23 +00:00
bbd802681e
That's how it was intended to behave originally. One thing questionable here is contract price (policy thing, basically) being moved to smartcontract package, but it's probably fine for NEO 2.0 (as it won't change) and we'll make something better for NEO 3.0.
18 lines
362 B
Go
18 lines
362 B
Go
package smartcontract
|
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/util"
|
|
|
|
// GetDeploymentPrice returns contract deployment price based on its properties.
|
|
func GetDeploymentPrice(props PropertyState) util.Fixed8 {
|
|
fee := int64(100)
|
|
|
|
if props&HasStorage != 0 {
|
|
fee += 400
|
|
}
|
|
|
|
if props&HasDynamicInvoke != 0 {
|
|
fee += 500
|
|
}
|
|
|
|
return util.Fixed8FromInt64(fee)
|
|
}
|