mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 23:42:23 +00:00
28908aa3cf
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
29 lines
666 B
Go
29 lines
666 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"
|
|
CryptoLib = "CryptoLib"
|
|
StdLib = "StdLib"
|
|
)
|
|
|
|
// IsValid checks if the 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
|
|
}
|