mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 03:58:06 +00:00
19 lines
362 B
Go
19 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)
|
||
|
}
|