Documentation ¶
Index ¶
Constants ¶
View Source
const ( LogLevel string = "LogLevel" LogLevelS string = "l" HostFlag string = "address" HostFlagS string = "a" PortFlag string = "port" PortFlagS string = "p" )
View Source
const ( HOST string = "0.0.0.0" PORT int = 46658 )
View Source
const ( Bech32PrefixAccAddr = "shareledger" // Bech32PrefixAccPub defines the Bech32 prefix of an account's public key Bech32PrefixAccPub = "shareledgerpub" // Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address Bech32PrefixValAddr = "shareledgervaloper" // Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key Bech32PrefixValPub = "shareledgervaloperpub" // Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address Bech32PrefixConsAddr = "shareledgervalcons" // Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key Bech32PrefixConsPub = "shareledgervalconspub" )
bench32 prefix Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
View Source
const ACCOUNT_INVALID_INTERFACE = "accountMapper requries a proto BaseAccount, but %v doesn't implement BaseAccount interface."
View Source
const ACCOUNT_INVALID_STRUCT = "accountMapper requires a struct proto BaseAccount, or a pointer to one"
Proto Error
View Source
const BANK_INVALID_BURNT_DENOM = "Only booking denom %s is allowed to be burnt."
BANK
View Source
const BOOKING_ASSET_NOT_RENTED = "Asset %s is not rented."
View Source
const BOOKING_ASSET_RENTED = "Asset %s is already rented."
View Source
const BOOKING_COMPLETED_ERROR = "The booking %s is already completed."
View Source
const BOOKING_INSUFFICIENT_BALANCE = "Account %s has insuficient balance."
View Source
const BOOKING_MISMATCH_RENTER = "Mismatch renter from Booking request %s with Complete request %s"
NOT FOUND
View Source
const DEC_INVALID_DECIMALS = "Too many decimal digits in fractional part. %s"
View Source
const DEC_TWO_SEPARATORS = "Two separators found at %d and %d."
Two separators found
View Source
const DEFAULT_AMOUNT = 0
View Source
const DEFAULT_DENOM = "SHR"
APP ACCOUNT
View Source
const ERROR_DECODING = "Decoding %s failed."
View Source
const ERROR_ENCODING = "Encoding %s failed."
ENCODING ERROR
View Source
const ERROR_STORE_NOT_FOUND = "%s cannot be found in Store %s."
View Source
const ERROR_STORE_RETRIEVAL = "Retrieval %s from Store %s failed."
STORE OPERATION ERRORS
View Source
const ERROR_STORE_UPDATE = "Update %s to Store %s failed."
View Source
const EXC_ALREADY_EXIST = "Exchange Rate from %s to %s has already existed."
View Source
const EXC_EXCHANGE_RATE_NOT_FOUND = "Exchange Rate from %s to %s not found."
View Source
const EXC_INSUFFICIENT_BALANCE = "Account (%s < %s) or Reserve (%s < %s) has insufficient amount."
View Source
const EXC_INVALID_AMOUNT = "Amount must be larger than 0. Provided amount %s."
View Source
const EXC_INVALID_DENOM = "Invalid Denom. Required %s. Provided %s."
Exchange
View Source
const EXC_INVALID_RATE = "Rate must be larger than 0. Provided rate %s."
View Source
const EXC_INVALID_RESERVE = "Invalid Reserve %s."
View Source
const EXC_JSON_MARSHAL = "MarshalJSON failed. %s"
View Source
const EXC_SAME_DENOM = "FromDenom and ToDenom should be different. Not the same %s."
View Source
const FEE_DENOM = "SHR"
View Source
const INSUFFICIENT_BALANCE = "Account %s has insufficient balance."
Tx Fee Calculation
View Source
const INVALID_TX_FEE = "Invalid transaction fee %s."
View Source
const MESSAGE_ASSET = "asset"
View Source
const MESSAGE_AUTH = "auth"
MESSAGE TYPE
View Source
const MESSAGE_BANK = "bank"
View Source
const MESSAGE_BOOKING = "booking"
View Source
const MESSAGE_EXCHANGE_RATE = "exchangerate"
View Source
const MESSAGE_IDENTITY = "identity"
View Source
const MESSAGE_POS = "pos"
View Source
const POS_DELEGATION_NOT_FOUND = "Delegation with address %X not found."
View Source
const POS_INSUFFICIENT_MASTERNODE_TOKEN = "Master Node needs at least 2000000 Token"
View Source
const POS_INVALID_DELEGATION_TOKEN = "Staking is greater than 50% token on Pool"
View Source
const POS_INVALID_PARAMS = "Unmarshal to Query params failed. %s"
View Source
const POS_INVALID_VALIDATOR_ADDRESS = "Validator Address is in incorrect format. Error: %s"
View Source
const POS_MARSHAL_ERROR = "Marshal to JSON failed. %s"
View Source
const POS_VALIDATOR_DIST_NOT_FOUND = "Validator Distribution Info for %X not found."
View Source
const POS_WITHDRAWAL_ERROR = "Error in withdrawl for delegator %s."
POS
View Source
const PREFIX_ADDRESS = "account:" // address to string to store in Auth Module
View Source
const PREFIX_IDENTITY = "id:" // address to string to store in Identity Module
View Source
const RES_OWN_ACCOUNT = "An account can only burn Coins of its own. Account %s != Signer %s."
View Source
const RES_RESERVE_ONLY = "Only priviledged accounts can execute this transaction."
RESERVE
View Source
const SHRACCOUNT_EXISITNG_ADDRESS = "Address already exists."
SHRAccount
View Source
const SHRACCOUNT_INVALID_ADDRESS = "Invalid address."
View Source
const STORE_ASSET = "asset"
View Source
const STORE_AUTH = "auth"
View Source
const STORE_BANK = "bank"
STORE
View Source
const STORE_BOOKING = "booking"
View Source
const STORE_EXCHANGE = "excrate"
View Source
const STORE_IDENTITY = "identity"
View Source
const STORE_POS = "pos"
Variables ¶
View Source
var ALL_DENOMS = []string{"SHRP", "SHR"}
View Source
var BOOKING_DENOM = "SHRP"
View Source
var DEFAULT_RESERVE = "405C725BC461DCA455B8AA84769E8ACE6B3763F4"
View Source
var DENOM_LIST = map[string]bool{"SHRP": true, "SHR": true}
ALLOWED DENOM
View Source
var EXCHANGABLE_FEE_DENOM = "SHRP"
View Source
var LEVELS = map[string]FeeLevel{ "MsgSend": LOW, "MsgCreate": HIGH, "MsgUpdate": MED, "MsgDelete": LOW, "MsgBook": HIGH, "MsgComplete": MED, "MsgIDCreate": HIGH, "MsgIDUpdate": HIGH, "MsgIDDelete": HIGH, }
View Source
var (
LOGGER log.Logger
)
View Source
var MIN_MASTER_NODE_TOKEN int64 = 2000000
POS Constant
View Source
var POS_BLOCK_REWARD = int64(5)
View Source
var POS_DENOM = "SHR"
View Source
var RESERVE_ACCOUNTS = []string{
"405C725BC461DCA455B8AA84769E8ACE6B3763F4",
"B87D5A84F7DCE488BA2FCBDD2057023561BC05A4",
}
EXCHANGE
View Source
var UNBONDING_TIME time.Duration = 60 * 60 * 24 * 3 * time.Second //3 weeks -> adjust it
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.