rtconfig

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2025 License: MIT Imports: 14 Imported by: 0

README

Runtime Config

High level design

When process receives SIGHUP signal, it'll reload runtime config file (path set as a flag), parse and update the runtime config (eg. https://golang.org/pkg/sync/atomic/#example_Value_config)

Current rtc includes

  1. gas lower bound
  2. gas upper bound
  3. openchannel rate limit interval
  4. stream send timeout

task breakdown:

  1. rtc json key value and corresponding go struct (or use .proto?)
  2. parse rtc.json once in server init
  3. create a chan for os.Signal and if syscall.SIGHUP, reload again
  4. places using the value needs to be changed to read from rtc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddGasGwei

func GetAddGasGwei() uint64

GeAddGasGwei returns add_gas_gwei

func GetDepositMaxBatchSize

func GetDepositMaxBatchSize() uint64

func GetDepositMinBatchSize

func GetDepositMinBatchSize() uint64

func GetDepositPollingInterval

func GetDepositPollingInterval() uint64

func GetErc20ColdBootstrapDeposit

func GetErc20ColdBootstrapDeposit(addr []byte) *big.Int

GetErc20ColdBootstrapDeposit returns osp erc20 deposit cap for cold bootstrap If it's configured in erc20_cold_bootstrap_deposit_map, return the value corresponding to the token addr. Otherwise, returns the default for rtconfig. If rtconfig is empty, return a hard-coded default

func GetEthColdBootstrapDeposit

func GetEthColdBootstrapDeposit() *big.Int

GetEthColdBootstrapDeposit returns osp eth deposit cap for cold bootstrap Return a hard-coded default if it's not set in rtconfig.

func GetMaxDisputeTimeout

func GetMaxDisputeTimeout() uint64

GetMaxDisputeTimeout returns max_dispute_timeout

func GetMaxGasGwei

func GetMaxGasGwei() uint64

GetMaxGasGwei returns max_gas_gwei

func GetMaxNumPendingPays

func GetMaxNumPendingPays() uint64

func GetMaxPaymentTimeout

func GetMaxPaymentTimeout() uint64

func GetMinDisputeTimeout

func GetMinDisputeTimeout() uint64

GetMinDisputeTimeout returns max_dispute_timeout

func GetMinGasGwei

func GetMinGasGwei() uint64

GetMinGasGwei returns min_gas_gwei

func GetOpenChanWaitSecond

func GetOpenChanWaitSecond() int64

GetOpenChanWaitSecond returns open_chan_wait_s int64 for easy use with time.XX funcs

func GetOspDepositMultiplier

func GetOspDepositMultiplier() int64

GetOspDepositMultiplier returns osp_deposit_multiplier If not set in rtconfig, returns 10.

func GetRefillAmountAndMaxWait

func GetRefillAmountAndMaxWait(tokenAddr string) (*big.Int, time.Duration)

func GetRefillPoolThreshold

func GetRefillPoolThreshold(tokenAddr string) *big.Int

func GetRefillThreshold

func GetRefillThreshold(tokenAddr string) *big.Int

func GetStreamSendTimeoutSecond

func GetStreamSendTimeoutSecond() uint64

GetStreamSendTimeoutSecond returns stream_send_timeout_s

func GetWaitMinedTxQueryRetryInterval

func GetWaitMinedTxQueryRetryInterval() uint64

func GetWaitMinedTxQueryTimeout

func GetWaitMinedTxQueryTimeout() uint64

func GetWaitMinedTxTimeout

func GetWaitMinedTxTimeout() uint64

func Init

func Init(path string) error

Init parse the json config file at path and start a goroutine to reload upon syscall.SIGHUP errors are not critical because default values have no effect

Types

type DepositConfig

type DepositConfig struct {
	// deposit polling interval in seconds
	PollingIntervalS     uint64   `protobuf:"varint,1,opt,name=polling_interval_s,json=pollingIntervalS,proto3" json:"polling_interval_s,omitempty"`
	MinBatchSize         uint64   `protobuf:"varint,2,opt,name=min_batch_size,json=minBatchSize,proto3" json:"min_batch_size,omitempty"`
	MaxBatchSize         uint64   `protobuf:"varint,3,opt,name=max_batch_size,json=maxBatchSize,proto3" json:"max_batch_size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 4

func (*DepositConfig) Descriptor

func (*DepositConfig) Descriptor() ([]byte, []int)

func (*DepositConfig) GetMaxBatchSize

func (m *DepositConfig) GetMaxBatchSize() uint64

func (*DepositConfig) GetMinBatchSize

func (m *DepositConfig) GetMinBatchSize() uint64

func (*DepositConfig) GetPollingIntervalS

func (m *DepositConfig) GetPollingIntervalS() uint64

func (*DepositConfig) ProtoMessage

func (*DepositConfig) ProtoMessage()

func (*DepositConfig) Reset

func (m *DepositConfig) Reset()

func (*DepositConfig) String

func (m *DepositConfig) String() string

func (*DepositConfig) XXX_DiscardUnknown

func (m *DepositConfig) XXX_DiscardUnknown()

func (*DepositConfig) XXX_Marshal

func (m *DepositConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DepositConfig) XXX_Merge

func (m *DepositConfig) XXX_Merge(src proto.Message)

func (*DepositConfig) XXX_Size

func (m *DepositConfig) XXX_Size() int

func (*DepositConfig) XXX_Unmarshal

func (m *DepositConfig) XXX_Unmarshal(b []byte) error

type OspToOspOpenConfig

type OspToOspOpenConfig struct {
	// tokenAddr -> OneTokenOspToOspOpenConfig
	TokensConfig         map[string]*StandardConfig `` /* 185-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

Next Tag: 2

func (*OspToOspOpenConfig) Descriptor

func (*OspToOspOpenConfig) Descriptor() ([]byte, []int)

func (*OspToOspOpenConfig) GetTokensConfig

func (m *OspToOspOpenConfig) GetTokensConfig() map[string]*StandardConfig

func (*OspToOspOpenConfig) ProtoMessage

func (*OspToOspOpenConfig) ProtoMessage()

func (*OspToOspOpenConfig) Reset

func (m *OspToOspOpenConfig) Reset()

func (*OspToOspOpenConfig) String

func (m *OspToOspOpenConfig) String() string

func (*OspToOspOpenConfig) XXX_DiscardUnknown

func (m *OspToOspOpenConfig) XXX_DiscardUnknown()

func (*OspToOspOpenConfig) XXX_Marshal

func (m *OspToOspOpenConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OspToOspOpenConfig) XXX_Merge

func (m *OspToOspOpenConfig) XXX_Merge(src proto.Message)

func (*OspToOspOpenConfig) XXX_Size

func (m *OspToOspOpenConfig) XXX_Size() int

func (*OspToOspOpenConfig) XXX_Unmarshal

func (m *OspToOspOpenConfig) XXX_Unmarshal(b []byte) error

type OspToOspOpenConfigs

type OspToOspOpenConfigs struct {
	// ospAddr ->  OspToOspOpenConfig
	Configs              map[string]*OspToOspOpenConfig `` /* 155-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
	XXX_unrecognized     []byte                         `json:"-"`
	XXX_sizecache        int32                          `json:"-"`
}

Next Tag: 2

func GetOspToOspOpenConfigs

func GetOspToOspOpenConfigs() *OspToOspOpenConfigs

func (*OspToOspOpenConfigs) Descriptor

func (*OspToOspOpenConfigs) Descriptor() ([]byte, []int)

func (*OspToOspOpenConfigs) GetConfigs

func (m *OspToOspOpenConfigs) GetConfigs() map[string]*OspToOspOpenConfig

func (*OspToOspOpenConfigs) ProtoMessage

func (*OspToOspOpenConfigs) ProtoMessage()

func (*OspToOspOpenConfigs) Reset

func (m *OspToOspOpenConfigs) Reset()

func (*OspToOspOpenConfigs) String

func (m *OspToOspOpenConfigs) String() string

func (*OspToOspOpenConfigs) XXX_DiscardUnknown

func (m *OspToOspOpenConfigs) XXX_DiscardUnknown()

func (*OspToOspOpenConfigs) XXX_Marshal

func (m *OspToOspOpenConfigs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OspToOspOpenConfigs) XXX_Merge

func (m *OspToOspOpenConfigs) XXX_Merge(src proto.Message)

func (*OspToOspOpenConfigs) XXX_Size

func (m *OspToOspOpenConfigs) XXX_Size() int

func (*OspToOspOpenConfigs) XXX_Unmarshal

func (m *OspToOspOpenConfigs) XXX_Unmarshal(b []byte) error

type RefillConfig

type RefillConfig struct {
	Token                *Token   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Threshold            string   `protobuf:"bytes,2,opt,name=threshold,proto3" json:"threshold,omitempty"`
	RefillAmount         string   `protobuf:"bytes,3,opt,name=refill_amount,json=refillAmount,proto3" json:"refill_amount,omitempty"`
	PoolSize             string   `protobuf:"bytes,4,opt,name=pool_size,json=poolSize,proto3" json:"pool_size,omitempty"`
	PoolLowRatio         float64  `protobuf:"fixed64,5,opt,name=pool_low_ratio,json=poolLowRatio,proto3" json:"pool_low_ratio,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 4

func (*RefillConfig) Descriptor

func (*RefillConfig) Descriptor() ([]byte, []int)

func (*RefillConfig) GetPoolLowRatio

func (m *RefillConfig) GetPoolLowRatio() float64

func (*RefillConfig) GetPoolSize

func (m *RefillConfig) GetPoolSize() string

func (*RefillConfig) GetRefillAmount

func (m *RefillConfig) GetRefillAmount() string

func (*RefillConfig) GetThreshold

func (m *RefillConfig) GetThreshold() string

func (*RefillConfig) GetToken

func (m *RefillConfig) GetToken() *Token

func (*RefillConfig) ProtoMessage

func (*RefillConfig) ProtoMessage()

func (*RefillConfig) Reset

func (m *RefillConfig) Reset()

func (*RefillConfig) String

func (m *RefillConfig) String() string

func (*RefillConfig) XXX_DiscardUnknown

func (m *RefillConfig) XXX_DiscardUnknown()

func (*RefillConfig) XXX_Marshal

func (m *RefillConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RefillConfig) XXX_Merge

func (m *RefillConfig) XXX_Merge(src proto.Message)

func (*RefillConfig) XXX_Size

func (m *RefillConfig) XXX_Size() int

func (*RefillConfig) XXX_Unmarshal

func (m *RefillConfig) XXX_Unmarshal(b []byte) error

type RefillConfigs

type RefillConfigs struct {
	Config map[string]*RefillConfig `` /* 153-byte string literal not displayed */
	// max batch waiting time in seconds
	MaxWaitS             uint64   `protobuf:"varint,2,opt,name=max_wait_s,json=maxWaitS,proto3" json:"max_wait_s,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 3

func GetRefillConfigs

func GetRefillConfigs() *RefillConfigs

func (*RefillConfigs) Descriptor

func (*RefillConfigs) Descriptor() ([]byte, []int)

func (*RefillConfigs) GetConfig

func (m *RefillConfigs) GetConfig() map[string]*RefillConfig

func (*RefillConfigs) GetMaxWaitS

func (m *RefillConfigs) GetMaxWaitS() uint64

func (*RefillConfigs) ProtoMessage

func (*RefillConfigs) ProtoMessage()

func (*RefillConfigs) Reset

func (m *RefillConfigs) Reset()

func (*RefillConfigs) String

func (m *RefillConfigs) String() string

func (*RefillConfigs) XXX_DiscardUnknown

func (m *RefillConfigs) XXX_DiscardUnknown()

func (*RefillConfigs) XXX_Marshal

func (m *RefillConfigs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RefillConfigs) XXX_Merge

func (m *RefillConfigs) XXX_Merge(src proto.Message)

func (*RefillConfigs) XXX_Size

func (m *RefillConfigs) XXX_Size() int

func (*RefillConfigs) XXX_Unmarshal

func (m *RefillConfigs) XXX_Unmarshal(b []byte) error

type RuntimeConfig

type RuntimeConfig struct {
	// wait seconds before accepting next open chan request
	// if 0, means no wait. negative values are treated as 0
	// use int64 instead of uint64 because golang time use int64
	OpenChanWaitS int64 `protobuf:"varint,1,opt,name=open_chan_wait_s,json=openChanWaitS,proto3" json:"open_chan_wait_s,omitempty"`
	// minimal gas price in gwei for onchain tx
	// 0 isn't a valid value
	MinGasGwei uint64 `protobuf:"varint,2,opt,name=min_gas_gwei,json=minGasGwei,proto3" json:"min_gas_gwei,omitempty"`
	// max gas price in gwei for onchain tx
	// if 0, means no max
	MaxGasGwei uint64 `protobuf:"varint,3,opt,name=max_gas_gwei,json=maxGasGwei,proto3" json:"max_gas_gwei,omitempty"`
	// add gas price to the suggested price to speed up transaction
	AddGasGwei uint64 `protobuf:"varint,20,opt,name=add_gas_gwei,json=addGasGwei,proto3" json:"add_gas_gwei,omitempty"`
	// wait time (in seconds) of stream send.
	StreamSendTimeoutS uint64 `protobuf:"varint,4,opt,name=stream_send_timeout_s,json=streamSendTimeoutS,proto3" json:"stream_send_timeout_s,omitempty"`
	// decimal. eth deposit cap for cold bootstrap
	EthColdBootstrapDeposit string `` /* 134-byte string literal not displayed */
	// key:hex without "0x", value:decimal. Per token deposit cap for cold bootstrap
	Erc20ColdBootstrapDepositMap map[string]string `` /* 239-byte string literal not displayed */
	// decimal. Default token deposit cap for cold bootstrap
	Erc20ColdBootstrapDepositDefault string `` /* 163-byte string literal not displayed */
	// Multiplier cap
	OspDepositMultiplier int64 `protobuf:"varint,8,opt,name=osp_deposit_multiplier,json=ospDepositMultiplier,proto3" json:"osp_deposit_multiplier,omitempty"`
	// max dispute timeout in open channel request.
	MaxDisputeTimeout uint64 `protobuf:"varint,9,opt,name=max_dispute_timeout,json=maxDisputeTimeout,proto3" json:"max_dispute_timeout,omitempty"`
	// min dispute timeout in open channel request.
	MinDisputeTimeout uint64 `protobuf:"varint,10,opt,name=min_dispute_timeout,json=minDisputeTimeout,proto3" json:"min_dispute_timeout,omitempty"`
	// log level: trace, debug, info, warn, error, fatal, panic
	LogLevel        string           `protobuf:"bytes,11,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"`
	TcbConfigs      *TcbConfigs      `protobuf:"bytes,12,opt,name=tcb_configs,json=tcbConfigs,proto3" json:"tcb_configs,omitempty"`
	StandardConfigs *StandardConfigs `protobuf:"bytes,13,opt,name=standard_configs,json=standardConfigs,proto3" json:"standard_configs,omitempty"`
	// OspToOsp config is keyed by pair (peerOspAddr, tokenAddr)
	OspToOspOpenConfigs *OspToOspOpenConfigs `protobuf:"bytes,17,opt,name=osp_to_osp_open_configs,json=ospToOspOpenConfigs,proto3" json:"osp_to_osp_open_configs,omitempty"`
	// max payment timeout (in block number) OSP accepts
	MaxPaymentTimeout uint64 `protobuf:"varint,14,opt,name=max_payment_timeout,json=maxPaymentTimeout,proto3" json:"max_payment_timeout,omitempty"`
	// max number of pending pay IDs in the simplex state
	MaxNumPendingPays uint64 `protobuf:"varint,15,opt,name=max_num_pending_pays,json=maxNumPendingPays,proto3" json:"max_num_pending_pays,omitempty"`
	// channel refill configuration
	RefillConfigs *RefillConfigs `protobuf:"bytes,16,opt,name=refill_configs,json=refillConfigs,proto3" json:"refill_configs,omitempty"`
	// deposit configuration
	DepositConfig *DepositConfig `protobuf:"bytes,18,opt,name=deposit_config,json=depositConfig,proto3" json:"deposit_config,omitempty"`
	// config to wait mined tx
	WaitMinedConfig      *WaitMinedConfig `protobuf:"bytes,19,opt,name=wait_mined_config,json=waitMinedConfig,proto3" json:"wait_mined_config,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

RuntimeConfig is the data object holding configs reloadable during runtime numeric field name should end with unit, eg. gwei, ms Next tag: 21

func (*RuntimeConfig) Descriptor

func (*RuntimeConfig) Descriptor() ([]byte, []int)

func (*RuntimeConfig) GetAddGasGwei

func (m *RuntimeConfig) GetAddGasGwei() uint64

func (*RuntimeConfig) GetDepositConfig

func (m *RuntimeConfig) GetDepositConfig() *DepositConfig

func (*RuntimeConfig) GetErc20ColdBootstrapDepositDefault

func (m *RuntimeConfig) GetErc20ColdBootstrapDepositDefault() string

func (*RuntimeConfig) GetErc20ColdBootstrapDepositMap

func (m *RuntimeConfig) GetErc20ColdBootstrapDepositMap() map[string]string

func (*RuntimeConfig) GetEthColdBootstrapDeposit

func (m *RuntimeConfig) GetEthColdBootstrapDeposit() string

func (*RuntimeConfig) GetLogLevel

func (m *RuntimeConfig) GetLogLevel() string

func (*RuntimeConfig) GetMaxDisputeTimeout

func (m *RuntimeConfig) GetMaxDisputeTimeout() uint64

func (*RuntimeConfig) GetMaxGasGwei

func (m *RuntimeConfig) GetMaxGasGwei() uint64

func (*RuntimeConfig) GetMaxNumPendingPays

func (m *RuntimeConfig) GetMaxNumPendingPays() uint64

func (*RuntimeConfig) GetMaxPaymentTimeout

func (m *RuntimeConfig) GetMaxPaymentTimeout() uint64

func (*RuntimeConfig) GetMinDisputeTimeout

func (m *RuntimeConfig) GetMinDisputeTimeout() uint64

func (*RuntimeConfig) GetMinGasGwei

func (m *RuntimeConfig) GetMinGasGwei() uint64

func (*RuntimeConfig) GetOpenChanWaitS

func (m *RuntimeConfig) GetOpenChanWaitS() int64

func (*RuntimeConfig) GetOspDepositMultiplier

func (m *RuntimeConfig) GetOspDepositMultiplier() int64

func (*RuntimeConfig) GetOspToOspOpenConfigs

func (m *RuntimeConfig) GetOspToOspOpenConfigs() *OspToOspOpenConfigs

func (*RuntimeConfig) GetRefillConfigs

func (m *RuntimeConfig) GetRefillConfigs() *RefillConfigs

func (*RuntimeConfig) GetStandardConfigs

func (m *RuntimeConfig) GetStandardConfigs() *StandardConfigs

func (*RuntimeConfig) GetStreamSendTimeoutS

func (m *RuntimeConfig) GetStreamSendTimeoutS() uint64

func (*RuntimeConfig) GetTcbConfigs

func (m *RuntimeConfig) GetTcbConfigs() *TcbConfigs

func (*RuntimeConfig) GetWaitMinedConfig

func (m *RuntimeConfig) GetWaitMinedConfig() *WaitMinedConfig

func (*RuntimeConfig) ProtoMessage

func (*RuntimeConfig) ProtoMessage()

func (*RuntimeConfig) Reset

func (m *RuntimeConfig) Reset()

func (*RuntimeConfig) String

func (m *RuntimeConfig) String() string

func (*RuntimeConfig) XXX_DiscardUnknown

func (m *RuntimeConfig) XXX_DiscardUnknown()

func (*RuntimeConfig) XXX_Marshal

func (m *RuntimeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RuntimeConfig) XXX_Merge

func (m *RuntimeConfig) XXX_Merge(src proto.Message)

func (*RuntimeConfig) XXX_Size

func (m *RuntimeConfig) XXX_Size() int

func (*RuntimeConfig) XXX_Unmarshal

func (m *RuntimeConfig) XXX_Unmarshal(b []byte) error

type StandardConfig

type StandardConfig struct {
	Token            *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	MinDeposit       string `protobuf:"bytes,5,opt,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"`
	MaxDeposit       string `protobuf:"bytes,2,opt,name=max_deposit,json=maxDeposit,proto3" json:"max_deposit,omitempty"`
	MinDeadlineDelta uint64 `protobuf:"varint,3,opt,name=min_deadline_delta,json=minDeadlineDelta,proto3" json:"min_deadline_delta,omitempty"`
	MaxDeadlineDelta uint64 `protobuf:"varint,4,opt,name=max_deadline_delta,json=maxDeadlineDelta,proto3" json:"max_deadline_delta,omitempty"`
	// matching ratio of approving osp
	// deposit of approving osp / deposit of requesting osp <= matching ratio
	MatchingRatio        float32  `protobuf:"fixed32,6,opt,name=matching_ratio,json=matchingRatio,proto3" json:"matching_ratio,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 7

func (*StandardConfig) Descriptor

func (*StandardConfig) Descriptor() ([]byte, []int)

func (*StandardConfig) GetMatchingRatio

func (m *StandardConfig) GetMatchingRatio() float32

func (*StandardConfig) GetMaxDeadlineDelta

func (m *StandardConfig) GetMaxDeadlineDelta() uint64

func (*StandardConfig) GetMaxDeposit

func (m *StandardConfig) GetMaxDeposit() string

func (*StandardConfig) GetMinDeadlineDelta

func (m *StandardConfig) GetMinDeadlineDelta() uint64

func (*StandardConfig) GetMinDeposit

func (m *StandardConfig) GetMinDeposit() string

func (*StandardConfig) GetToken

func (m *StandardConfig) GetToken() *Token

func (*StandardConfig) ProtoMessage

func (*StandardConfig) ProtoMessage()

func (*StandardConfig) Reset

func (m *StandardConfig) Reset()

func (*StandardConfig) String

func (m *StandardConfig) String() string

func (*StandardConfig) XXX_DiscardUnknown

func (m *StandardConfig) XXX_DiscardUnknown()

func (*StandardConfig) XXX_Marshal

func (m *StandardConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StandardConfig) XXX_Merge

func (m *StandardConfig) XXX_Merge(src proto.Message)

func (*StandardConfig) XXX_Size

func (m *StandardConfig) XXX_Size() int

func (*StandardConfig) XXX_Unmarshal

func (m *StandardConfig) XXX_Unmarshal(b []byte) error

type StandardConfigs

type StandardConfigs struct {
	// keyed by token addr.
	Config               map[string]*StandardConfig `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

Next Tag: 2

func GetStandardConfigs

func GetStandardConfigs() *StandardConfigs

func (*StandardConfigs) Descriptor

func (*StandardConfigs) Descriptor() ([]byte, []int)

func (*StandardConfigs) GetConfig

func (m *StandardConfigs) GetConfig() map[string]*StandardConfig

func (*StandardConfigs) ProtoMessage

func (*StandardConfigs) ProtoMessage()

func (*StandardConfigs) Reset

func (m *StandardConfigs) Reset()

func (*StandardConfigs) String

func (m *StandardConfigs) String() string

func (*StandardConfigs) XXX_DiscardUnknown

func (m *StandardConfigs) XXX_DiscardUnknown()

func (*StandardConfigs) XXX_Marshal

func (m *StandardConfigs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StandardConfigs) XXX_Merge

func (m *StandardConfigs) XXX_Merge(src proto.Message)

func (*StandardConfigs) XXX_Size

func (m *StandardConfigs) XXX_Size() int

func (*StandardConfigs) XXX_Unmarshal

func (m *StandardConfigs) XXX_Unmarshal(b []byte) error

type TcbConfig

type TcbConfig struct {
	Token                      *Token   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	MaxOspDeposit              string   `protobuf:"bytes,2,opt,name=max_osp_deposit,json=maxOspDeposit,proto3" json:"max_osp_deposit,omitempty"`
	OnchainBalanceSafeMargin   string   `` /* 137-byte string literal not displayed */
	RequiredSocialVerification bool     `` /* 142-byte string literal not displayed */
	SkipOverCommitCheck        bool     `protobuf:"varint,5,opt,name=skip_over_commit_check,json=skipOverCommitCheck,proto3" json:"skip_over_commit_check,omitempty"`
	XXX_NoUnkeyedLiteral       struct{} `json:"-"`
	XXX_unrecognized           []byte   `json:"-"`
	XXX_sizecache              int32    `json:"-"`
}

Next Tag: 6

func (*TcbConfig) Descriptor

func (*TcbConfig) Descriptor() ([]byte, []int)

func (*TcbConfig) GetMaxOspDeposit

func (m *TcbConfig) GetMaxOspDeposit() string

func (*TcbConfig) GetOnchainBalanceSafeMargin

func (m *TcbConfig) GetOnchainBalanceSafeMargin() string

func (*TcbConfig) GetRequiredSocialVerification

func (m *TcbConfig) GetRequiredSocialVerification() bool

func (*TcbConfig) GetSkipOverCommitCheck

func (m *TcbConfig) GetSkipOverCommitCheck() bool

func (*TcbConfig) GetToken

func (m *TcbConfig) GetToken() *Token

func (*TcbConfig) ProtoMessage

func (*TcbConfig) ProtoMessage()

func (*TcbConfig) Reset

func (m *TcbConfig) Reset()

func (*TcbConfig) String

func (m *TcbConfig) String() string

func (*TcbConfig) XXX_DiscardUnknown

func (m *TcbConfig) XXX_DiscardUnknown()

func (*TcbConfig) XXX_Marshal

func (m *TcbConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TcbConfig) XXX_Merge

func (m *TcbConfig) XXX_Merge(src proto.Message)

func (*TcbConfig) XXX_Size

func (m *TcbConfig) XXX_Size() int

func (*TcbConfig) XXX_Unmarshal

func (m *TcbConfig) XXX_Unmarshal(b []byte) error

type TcbConfigs

type TcbConfigs struct {
	Config               map[string]*TcbConfig `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

Next Tag: 2

func GetTcbConfigs

func GetTcbConfigs() *TcbConfigs

func (*TcbConfigs) Descriptor

func (*TcbConfigs) Descriptor() ([]byte, []int)

func (*TcbConfigs) GetConfig

func (m *TcbConfigs) GetConfig() map[string]*TcbConfig

func (*TcbConfigs) ProtoMessage

func (*TcbConfigs) ProtoMessage()

func (*TcbConfigs) Reset

func (m *TcbConfigs) Reset()

func (*TcbConfigs) String

func (m *TcbConfigs) String() string

func (*TcbConfigs) XXX_DiscardUnknown

func (m *TcbConfigs) XXX_DiscardUnknown()

func (*TcbConfigs) XXX_Marshal

func (m *TcbConfigs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TcbConfigs) XXX_Merge

func (m *TcbConfigs) XXX_Merge(src proto.Message)

func (*TcbConfigs) XXX_Size

func (m *TcbConfigs) XXX_Size() int

func (*TcbConfigs) XXX_Unmarshal

func (m *TcbConfigs) XXX_Unmarshal(b []byte) error

type Token

type Token struct {
	ErcType              string   `protobuf:"bytes,1,opt,name=erc_type,json=ercType,proto3" json:"erc_type,omitempty"`
	Address              string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Next Tag: 3

func (*Token) Descriptor

func (*Token) Descriptor() ([]byte, []int)

func (*Token) GetAddress

func (m *Token) GetAddress() string

func (*Token) GetErcType

func (m *Token) GetErcType() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) String

func (m *Token) String() string

func (*Token) XXX_DiscardUnknown

func (m *Token) XXX_DiscardUnknown()

func (*Token) XXX_Marshal

func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Token) XXX_Merge

func (m *Token) XXX_Merge(src proto.Message)

func (*Token) XXX_Size

func (m *Token) XXX_Size() int

func (*Token) XXX_Unmarshal

func (m *Token) XXX_Unmarshal(b []byte) error

type WaitMinedConfig

type WaitMinedConfig struct {
	TxTimeoutS            uint64   `protobuf:"varint,1,opt,name=tx_timeout_s,json=txTimeoutS,proto3" json:"tx_timeout_s,omitempty"`
	TxQueryTimeoutS       uint64   `protobuf:"varint,2,opt,name=tx_query_timeout_s,json=txQueryTimeoutS,proto3" json:"tx_query_timeout_s,omitempty"`
	TxQueryRetryIntervalS uint64   `` /* 131-byte string literal not displayed */
	XXX_NoUnkeyedLiteral  struct{} `json:"-"`
	XXX_unrecognized      []byte   `json:"-"`
	XXX_sizecache         int32    `json:"-"`
}

func (*WaitMinedConfig) Descriptor

func (*WaitMinedConfig) Descriptor() ([]byte, []int)

func (*WaitMinedConfig) GetTxQueryRetryIntervalS

func (m *WaitMinedConfig) GetTxQueryRetryIntervalS() uint64

func (*WaitMinedConfig) GetTxQueryTimeoutS

func (m *WaitMinedConfig) GetTxQueryTimeoutS() uint64

func (*WaitMinedConfig) GetTxTimeoutS

func (m *WaitMinedConfig) GetTxTimeoutS() uint64

func (*WaitMinedConfig) ProtoMessage

func (*WaitMinedConfig) ProtoMessage()

func (*WaitMinedConfig) Reset

func (m *WaitMinedConfig) Reset()

func (*WaitMinedConfig) String

func (m *WaitMinedConfig) String() string

func (*WaitMinedConfig) XXX_DiscardUnknown

func (m *WaitMinedConfig) XXX_DiscardUnknown()

func (*WaitMinedConfig) XXX_Marshal

func (m *WaitMinedConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WaitMinedConfig) XXX_Merge

func (m *WaitMinedConfig) XXX_Merge(src proto.Message)

func (*WaitMinedConfig) XXX_Size

func (m *WaitMinedConfig) XXX_Size() int

func (*WaitMinedConfig) XXX_Unmarshal

func (m *WaitMinedConfig) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL