neo-go/pkg/core/native/nativenames/names.go

30 lines
664 B
Go
Raw Normal View History

package nativenames
// Names of all native contracts.
const (
Management = "ContractManagement"
Ledger = "LedgerContract"
Neo = "NeoToken"
Gas = "GasToken"
Policy = "PolicyContract"
Oracle = "OracleContract"
Designation = "RoleManagement"
Notary = "Notary"
2021-02-15 15:43:10 +00:00
CryptoLib = "CryptoLib"
2021-03-03 15:59:10 +00:00
StdLib = "StdLib"
)
2021-03-12 10:04:41 +00:00
// IsValid checks that name is a valid native contract's name.
func IsValid(name string) bool {
return name == Management ||
name == Ledger ||
name == Neo ||
name == Gas ||
name == Policy ||
name == Oracle ||
name == Designation ||
name == Notary ||
name == CryptoLib ||
name == StdLib
}