31 lines
718 B
Go
31 lines
718 B
Go
package nativenames
|
|
|
|
// Names of all native contracts.
|
|
const (
|
|
Management = "ContractManagement"
|
|
Ledger = "LedgerContract"
|
|
Neo = "NeoToken"
|
|
Gas = "GasToken"
|
|
Policy = "PolicyContract"
|
|
Oracle = "OracleContract"
|
|
Designation = "RoleManagement"
|
|
Notary = "Notary"
|
|
NameService = "NameService"
|
|
CryptoLib = "CryptoLib"
|
|
StdLib = "StdLib"
|
|
)
|
|
|
|
// 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 == NameService ||
|
|
name == CryptoLib ||
|
|
name == StdLib
|
|
}
|