mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-13 15:45:01 +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)
|
||
|
}
|