80 lines
1.5 KiB
Go
80 lines
1.5 KiB
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"
|
|
Treasury = "Treasury"
|
|
Vita = "Vita"
|
|
RoleRegistry = "RoleRegistry"
|
|
VTS = "VTS"
|
|
Federation = "Federation"
|
|
Lex = "Lex"
|
|
Eligere = "Eligere"
|
|
Scire = "Scire"
|
|
Salus = "Salus"
|
|
Sese = "Sese"
|
|
Tribute = "Tribute"
|
|
Opus = "Opus"
|
|
)
|
|
|
|
// All contains the list of all native contract names ordered by the contract ID.
|
|
var All = []string{
|
|
Management,
|
|
StdLib,
|
|
CryptoLib,
|
|
Ledger,
|
|
Neo,
|
|
Gas,
|
|
Policy,
|
|
Designation,
|
|
Oracle,
|
|
Notary,
|
|
Treasury,
|
|
Vita,
|
|
RoleRegistry,
|
|
VTS,
|
|
Federation,
|
|
Lex,
|
|
Eligere,
|
|
Scire,
|
|
Salus,
|
|
Sese,
|
|
Tribute,
|
|
Opus,
|
|
}
|
|
|
|
// 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 ||
|
|
name == Treasury ||
|
|
name == Vita ||
|
|
name == RoleRegistry ||
|
|
name == VTS ||
|
|
name == Federation ||
|
|
name == Lex ||
|
|
name == Eligere ||
|
|
name == Scire ||
|
|
name == Salus ||
|
|
name == Sese ||
|
|
name == Tribute ||
|
|
name == Opus
|
|
}
|