Documentation ¶
Index ¶
Constants ¶
View Source
const ( CmdRootGvel = "gvel" CmdInit = "init" CmdEnv = "env" CmdEnvSet = "set" CmdAccount = "account" CmdAccountCreate = "create" CmdAccountDefault = "default" CmdAccountList = "list" CmdAccountImport = "import" CmdAccountExport = "export" CmdCredit = "credit" CmdCreditSetup = "setup" CmdCreditMintByCollateral = "mint-by-collateral" CmdCreditMintByCredit = "mint-by-credit" CmdCreditGetExchange = "get-exchange" CmdCreditRedeem = "redeem" CmdCollateral = "collateral" CmdCollateralHealthCheck = "health-check" CmdCollateralRebalance = "rebalance" FlagDefault = "default" )
View Source
const ( CfgKeyCurrentEnv = "currentEnv" CfgKeyEnvList = "envList" CfgKeyInitialized = "initialized" CfgKeyAccountDbPath = "accountDbPath" CfgKeyDefaultAccount = "defaultAccount" CfgKeyRpcUrl = "rpcUrl" CfgKeyDrsAddress = "drsAddress" CfgKeyHeartAddress = "heartAddress" )
View Source
const ( CursorDefault = "Default" CursorCurrent = "Current" )
View Source
const ( EnvMainNet = "mainnet" EnvTestNet = "testnet" TestNetRpcUrl = "http://127.0.0.1:7545" TestNetDrsAddress = "0x08d6b93451d00bE089e1c4f2A74D1485F559B6F1" TestNetHeartAddress = "0x833Aa557EDd8520055624E3Adc2315771f98248d" MainNetRpcUrl = "http://10.14.129.254:8545" MainNetDrsAddress = "0x3B39BaBa62bafF6367AE6BD3352FAD7C34C5938E" MainNetHeartAddress = "0xa910805697c4218a6b42ff3c11Be01990209f7Cf" )
View Source
const (
DefaultCurrentEnv = EnvTestNet
)
Variables ¶
View Source
var ( DefaultEnvList = []string{ strings.ToUpper(EnvTestNet), strings.ToUpper(EnvMainNet), } DefaultConfigMap = map[string]map[string]string{ EnvMainNet: { CfgKeyRpcUrl: MainNetRpcUrl, CfgKeyDrsAddress: MainNetDrsAddress, CfgKeyHeartAddress: MainNetHeartAddress, }, EnvTestNet: { CfgKeyRpcUrl: TestNetRpcUrl, CfgKeyDrsAddress: TestNetDrsAddress, CfgKeyHeartAddress: TestNetHeartAddress, }, } )
View Source
var FsBaseDir = path.Join(os.Getenv("HOME"), "/.gvel")
View Source
var FsConfigFileNameFormat = path.Join(FsBaseDir, "%s-config.json")
View Source
var FsMainnetConfigFile = fmt.Sprintf(FsConfigFileNameFormat, strings.ToLower(EnvMainNet))
View Source
var FsTestnetConfigFile = fmt.Sprintf(FsConfigFileNameFormat, strings.ToLower(EnvTestNet))
View Source
var Timeout = 10 * time.Second
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.