services

package
v0.0.0-...-e6d60d5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const MaxRecvMessageSize = 1024 * 1024 * 300

Variables

This section is empty.

Functions

This section is empty.

Types

type HsmConfig

type HsmConfig struct {
	EnableHsm  bool
	HsmAPIName string
	HsmCreden  string
	HsmAddress string
}

type RpcServer

type RpcServer struct {
	*RpcServerConfig
	*HsmConfig

	RawL1BridgeContract        *bind.BoundContract
	RawL1StakingBridgeContract *bind.BoundContract
	RawL2BridgeContract        map[uint64]*bind.BoundContract
	L1BridgeContract           *bridge.L1PoolManager
	L1StakingBridgeContract    *bridge.L1PoolManager
	BridgeContractAddress      map[uint64]common.Address
	L2BridgeContract           map[uint64]*bridge.L2PoolManager
	DAStrategyContract         map[uint64]*staking.StrategyBase
	RawDAStrategyContract      map[uint64]*bind.BoundContract
	DAStrategyAddress          map[uint64]common.Address
	GamingStrategyContract     map[uint64]*staking.StrategyBase
	RawGamingStrategyContract  map[uint64]*bind.BoundContract
	GamingStrategyAddress      map[uint64]common.Address
	SocialStrategyContract     map[uint64]*staking.StrategyBase
	RawSocialStrategyContract  map[uint64]*bind.BoundContract
	SocialStrategyAddress      map[uint64]common.Address

	RawL1StakingManagerContract  *bind.BoundContract
	StrategyManagerContract      map[uint64]*staking.StrategyManager
	RawStrategyManagerContract   map[uint64]*bind.BoundContract
	DelegationManagerContract    map[uint64]*staking.DelegationManager
	RawDelegationManagerContract map[uint64]*bind.BoundContract
	EthAddress                   map[uint64]common.Address
	WEthAddress                  map[uint64]common.Address
	USDTAddress                  map[uint64]common.Address
	USDCAddress                  map[uint64]common.Address
	DAIAddress                   map[uint64]common.Address
	OKBAddress                   map[uint64]common.Address
	MNTAddress                   map[uint64]common.Address

	pb.UnimplementedBridgeServiceServer

	pb.BridgeServiceServer
	// contains filtered or unexported fields
}

func NewRpcServer

func NewRpcServer(ctx context.Context, db *database.DB, grpcCfg *RpcServerConfig, hsmCfg *HsmConfig, chainRpcCfg []*config.RPC, priKey *ecdsa.PrivateKey, chainIds config.ChainId, l1StakingManagerAddr string, shutdown context.CancelCauseFunc) (*RpcServer, error)

func (*RpcServer) BatchMint

func (*RpcServer) ChangeBatchMintTransactionStatus

func (s *RpcServer) ChangeBatchMintTransactionStatus() error

func (*RpcServer) ChangeBridgeTransactionStatus

func (s *RpcServer) ChangeBridgeTransactionStatus() error

func (*RpcServer) ChangeDepositUpdateBalanceTransactionStatus

func (s *RpcServer) ChangeDepositUpdateBalanceTransactionStatus() error

func (*RpcServer) ChangeMigrateL1SharesTransactionStatus

func (s *RpcServer) ChangeMigrateL1SharesTransactionStatus() error

func (*RpcServer) ChangeQueueWithdrawalsTransactionStatus

func (s *RpcServer) ChangeQueueWithdrawalsTransactionStatus() error

func (*RpcServer) ChangeTransferToL2BridgeTransactionStatus

func (s *RpcServer) ChangeTransferToL2BridgeTransactionStatus() error

func (*RpcServer) ChangeUnstakeBatchTransactionStatus

func (s *RpcServer) ChangeUnstakeBatchTransactionStatus() error

func (*RpcServer) ChangeWithdrawUpdateBalanceTransactionStatus

func (s *RpcServer) ChangeWithdrawUpdateBalanceTransactionStatus() error

func (*RpcServer) CompletePoolAndNew

func (s *RpcServer) CompletePoolAndNew() error

func (*RpcServer) CrossChainTransfer

func (*RpcServer) MigrateL1Shares

func (*RpcServer) SendBatchMintTransaction

func (s *RpcServer) SendBatchMintTransaction() error

func (*RpcServer) SendBridgeTransaction

func (s *RpcServer) SendBridgeTransaction() error

func (*RpcServer) SendDepositUpdateBalanceTransaction

func (s *RpcServer) SendDepositUpdateBalanceTransaction() error

func (*RpcServer) SendMigrateL1SharesTransaction

func (s *RpcServer) SendMigrateL1SharesTransaction() error

func (*RpcServer) SendTransferToL2BridgeTransaction

func (s *RpcServer) SendTransferToL2BridgeTransaction() error

func (*RpcServer) SendUnstakeBatchTransaction

func (s *RpcServer) SendUnstakeBatchTransaction() error

func (*RpcServer) SendWithdrawUpdateBalanceTransaction

func (s *RpcServer) SendWithdrawUpdateBalanceTransaction() error

func (*RpcServer) Start

func (s *RpcServer) Start(ctx context.Context) error

func (*RpcServer) Stop

func (s *RpcServer) Stop(ctx context.Context) error

func (*RpcServer) Stopped

func (s *RpcServer) Stopped() bool

func (*RpcServer) UnstakeBatch

type RpcServerConfig

type RpcServerConfig struct {
	GrpcHostname string
	GrpcPort     string
}

Jump to

Keyboard shortcuts

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