config

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

View Source
const (
	RTokenSeriesModuleId = "RTokenSeries"

	LiquidityBondEventId      = "LiquidityBond"
	ExecuteBondAndSwapEventId = "ExecuteBondAndSwap"
	NominationUpdatedEventId  = "NominationUpdated"
	ValidatorUpdatedEventId   = "ValidatorUpdated"

	RClaimModuleId = "RClaim"

	StorageActLatestCycle     = "ActLatestCycle"
	StorageREthActLatestCycle = "REthActLatestCycle"
	StorageActs               = "Acts"
	StorageREthActs           = "REthActs"

	StorageBondRecords       = "BondRecords"
	StorageBondStates        = "BondStates"
	MethodExecuteBondRecord  = "RTokenSeries.execute_bond_record"
	MethodExecuteBondAndSwap = "RTokenSeries.execute_bond_and_swap"
	StorageNominated         = "Nominated"

	RtokenVoteModuleId         = "RTokenVotes"
	StorageVotes               = "Votes"
	MethodRacknowledgeProposal = "RTokenVotes.acknowledge_proposal"

	RTokenLedgerModuleId   = "RTokenLedger"
	EraPoolUpdatedEventId  = "EraPoolUpdated"
	EraUpdatedEventId      = "EraUpdated"
	BondingDurationEventId = "BondingDurationUpdated"

	RTokenRelayersModuleId                    = "Relayers"
	StorageChainEras                          = "ChainEras"
	StorageCurrentEraSnapShots                = "CurrentEraSnapShots"
	StorageRelayerThreshold                   = "RelayerThreshold"
	StorageEraSnapShots                       = "EraSnapShots"
	StorageLeastBond                          = "LeastBond"
	StoragePendingStake                       = "PendingStake"
	StoragePendingReward                      = "PendingReward"
	MethodSetChainEra                         = "RTokenLedger.set_chain_era"
	MethodBondReport                          = "RTokenLedger.bond_report"
	MethodNewBondReport                       = "RTokenLedger.new_bond_report"
	MethodActiveReport                        = "RTokenLedger.active_report"
	MethodNewActiveReport                     = "RTokenLedger.new_active_report"
	MethodBondAndReportActive                 = "RTokenLedger.bond_and_report_active"
	MethodBondAndReportActiveWithPendingValue = "RTokenLedger.bond_and_report_active_with_pending_value"
	MethodWithdrawReport                      = "RTokenLedger.withdraw_report"
	MethodTransferReport                      = "RTokenLedger.transfer_report"
	BondReportedEventId                       = "BondReported"
	ActiveReportedEventId                     = "ActiveReported"
	WithdrawReportedEventId                   = "WithdrawReported"
	TransferReportedEventId                   = "TransferReported"
	StorageSubAccounts                        = "SubAccounts"
	StorageMultiThresholds                    = "MultiThresholds"
	StorageBondedPools                        = "BondedPools"
	StorageSnapshots                          = "Snapshots"
	StoragePoolUnbonds                        = "PoolUnbonds"
	SignaturesEnoughEventId                   = "SignaturesEnough"
	StorageSignatures                         = "Signatures"
	SubmitSignatures                          = "RTokenSeries.submit_signatures"

	RTokenUnbondEventId = "LiquidityUnBond"

	RTokenBalanceModuleId = "RBalances"
	RTokenTransferEventId = "Transfer"
	RTokenMintedEventId   = "Minted"
	RTokenBurnedEventId   = "Burned"

	RTokenRateModuleId   = "RTokenRate"
	RTokenRateSetEventId = "RateSet"
	StorageEraRate       = "EraRate"

	RFisModuleId      = "RFis"
	RFisUnbondEventId = "LiquidityUnBond"

	EraPayoutEventId = "EraPayout"

	RDexSwapModuleId        = "RDexSwap"
	RDexSwapEventId         = "Swap"
	RDexAddLiquidityEventId = "AddLiquidity"
	RDexRmLiquidityEventId  = "RemoveLiquidity"
)
View Source
const (
	BalancesModuleId        = "Balances"
	TransferKeepAlive       = "transfer_keep_alive"
	Transfer                = "transfer"
	MethodTransferKeepAlive = "Balances.transfer_keep_alive"
	MethodTransfer          = "Balances.transfer"
	ConstExistentialDeposit = "ExistentialDeposit"

	StakingModuleId           = "Staking"
	StorageActiveEra          = "ActiveEra"
	StorageNominators         = "Nominators"
	StorageErasRewardPoints   = "ErasRewardPoints"
	StorageErasStakersClipped = "ErasStakersClipped"
	StorageEraNominated       = "EraNominated"
	StorageBonded             = "Bonded"
	StorageLedger             = "Ledger"
	MethodPayoutStakers       = "Staking.payout_stakers"
	MethodUnbond              = "Staking.unbond"
	MethodBondExtra           = "Staking.bond_extra"
	MethodWithdrawUnbonded    = "Staking.withdraw_unbonded"
	MethodNominate            = "Staking.nominate"

	MultisigModuleId        = "Multisig"
	NewMultisigEventId      = "NewMultisig"
	MultisigExecutedEventId = "MultisigExecuted"
	StorageMultisigs        = "Multisigs"
	MethodAsMulti           = "Multisig.as_multi"

	SystemModuleId = "System"
	StorageAccount = "Account"

	MethodBatch = "Utility.batch"

	ParamDest     = "dest"
	ParamDestType = "Address"

	ParamValue     = "value"
	ParamValueType = "Compact<Balance>"
)

Variables

View Source
var (
	DialTimeout      = 10 * time.Second
	SubscribeTimeout = 10 * time.Second
)

Functions

func SetDialTimeout added in v1.0.9

func SetDialTimeout(dialTimeout time.Duration)

func SetSubscribeTimeout added in v1.0.9

func SetSubscribeTimeout(subscribeTimeout time.Duration)

Types

type Config

type Config struct {
	RPCURL string

	// Timeouts
	DialTimeout      time.Duration
	SubscribeTimeout time.Duration
}

func Default

func Default() Config

DefaultConfig returns the default config. Default values can be overwritten with env variables, most importantly RPC_URL for a custom RPC endpoint.

Jump to

Keyboard shortcuts

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