mirror of
https://github.com/luxfi/oraclevm.git
synced 2026-10-30 15:23:15 +00:00
45 lines
932 B
Go
45 lines
932 B
Go
// Copyright (C) 2023, Ava Labs, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package consts
|
|
|
|
import (
|
|
"github.com/ava-labs/avalanchego/ids"
|
|
"github.com/ava-labs/avalanchego/vms/platformvm/warp"
|
|
"github.com/ava-labs/hypersdk/chain"
|
|
"github.com/ava-labs/hypersdk/codec"
|
|
"github.com/ava-labs/hypersdk/consts"
|
|
)
|
|
|
|
const (
|
|
HRP = "morpheus"
|
|
Name = "morpheusvm"
|
|
Symbol = "RED"
|
|
)
|
|
|
|
const (
|
|
// length in bytes
|
|
PayloadMaxLen = 1024
|
|
HistoryCacheLen = 500
|
|
HistoryPurgeLen = 200
|
|
)
|
|
|
|
var ID ids.ID
|
|
|
|
func init() {
|
|
b := make([]byte, consts.IDLen)
|
|
copy(b, []byte(Name))
|
|
vmID, err := ids.ToID(b)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
ID = vmID
|
|
}
|
|
|
|
// Instantiate registry here so it can be imported by any package. We set these
|
|
// values in [controller/registry].
|
|
var (
|
|
ActionRegistry *codec.TypeParser[chain.Action, *warp.Message, bool]
|
|
AuthRegistry *codec.TypeParser[chain.Auth, *warp.Message, bool]
|
|
)
|