Documentation ¶
Index ¶
- Constants
- type CommandExecuted
- type ContractCall
- type ContractCallApproved
- type ContractCallWithToken
- type ContractCallWithTokenApproved
- type IndexerClient
- func (c *IndexerClient) FindBlockEventsByAttribute(ctx context.Context, attribute string, values []string, options *Options) ([]models.BlockEvent, *types.Error)
- func (c *IndexerClient) FindEventAttributes(ctx context.Context, eventIds []uint) (map[uint]MapBlockEventAttributes, *types.Error)
- func (c *IndexerClient) FindEventsByType(ctx context.Context, options *Options) ([]models.BlockEvent, *types.Error)
- func (c *IndexerClient) FindEventsByTypes(ctx context.Context, options *Options) ([]models.BlockEvent, *types.Error)
- type MapBlockEventAttributes
- type Options
- type PostgresClient
- type RelayData
- type RelayDataStatus
- type RelayerClient
- func (c *RelayerClient) GetContractCallParams(ctx context.Context, messageIds []string) (map[string]ContractCall, *types.Error)
- func (c *RelayerClient) GetExecutedVaultBonding(ctx context.Context, options *Options) ([]RelayData, *types.Error)
- func (c *RelayerClient) GetRelayerDatas(ctx context.Context, options *Options) ([]RelayData, int, *types.Error)
- type ScalarClient
- func (s *ScalarClient) DeleteDApp(ID string) error
- func (s *ScalarClient) GetCustodialByName(name string) (*models.Custodial, error)
- func (s *ScalarClient) GetCustodialByNames(names []string) ([]*models.Custodial, error)
- func (s *ScalarClient) GetCustodialGroupByID(id uint) (*models.CustodialGroup, error)
- func (s *ScalarClient) GetCustodialGroupByName(name string) (*models.CustodialGroup, error)
- func (s *ScalarClient) GetCustodialGroups() ([]*models.CustodialGroup, error)
- func (s *ScalarClient) GetCustodials() ([]*models.Custodial, error)
- func (s *ScalarClient) GetDApps() ([]*models.DApp, error)
- func (s *ScalarClient) GetShortenCustodialGroups() ([]*models.ShortenCustodialGroup, error)
- func (s *ScalarClient) InitDApps(cfg config.InitDAppsConfig) error
- func (s *ScalarClient) SaveCustodial(custodial *models.Custodial) error
- func (s *ScalarClient) SaveCustodialGroup(custodialGroup *models.CustodialGroup) error
- func (s *ScalarClient) SaveDApp(dApp *models.DApp) error
- func (s *ScalarClient) ToggleDApp(ID string) error
- func (s *ScalarClient) UpdateDApp(dApp *models.DApp) error
Constants ¶
View Source
const QUERY_RELAYDATA = `` /* 2146-byte string literal not displayed */
View Source
const QUERY_RELAYDATA_COUNT = `SELECT COUNT(*) FROM "relay_data" rd`
View Source
const QUERY_VAULT_RELAYDATA = `` /* 1023-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandExecuted ¶
type CommandExecuted struct { ID string `gorm:"primaryKey"` SourceChain sql.NullString DestinationChain sql.NullString TxHash sql.NullString BlockNumber sql.NullInt32 LogIndex sql.NullInt32 CommandId sql.NullString Status sql.NullInt32 ReferenceTxHash sql.NullString Amount sql.NullString }
type ContractCall ¶
type ContractCall struct { ID string `gorm:"primaryKey"` CreatedAt sql.NullTime UpdatedAt sql.NullTime BlockNumber sql.NullInt32 `gorm:"column:block_number"` LogIndex sql.NullInt32 ContractAddress sql.NullString Payload sql.NullString PayloadHash sql.NullString SourceAddress sql.NullString DestUserAddress sql.NullString DestContractAddress sql.NullString //Same as ContractAddress Amount sql.NullString ContractCallApproved ContractCallApproved `gorm:"foreignKey:ID;references:ID"` CommandExecuted CommandExecuted `gorm:"foreignKey:ID;references:ID"` StakerPublicKey sql.NullString SenderAddress sql.NullString RelayDataID string TxHash sql.NullString TxHex []byte }
type ContractCallApproved ¶
type ContractCallApproved struct { ID string `gorm:"primaryKey"` CreatedAt sql.NullTime UpdatedAt sql.NullTime SourceChain sql.NullString DestinationChain sql.NullString TxHash sql.NullString BlockNumber sql.NullInt32 LogIndex sql.NullInt32 SourceAddress sql.NullString ContractAddress sql.NullString SourceTxHash sql.NullString SourceEventIndex sql.NullInt64 PayloadHash sql.NullString CommandId sql.NullString }
type ContractCallWithToken ¶
type ContractCallWithToken struct { ID string `gorm:"primaryKey"` CreatedAt sql.NullTime UpdatedAt sql.NullTime BlockNumber sql.NullInt32 ContractAddress sql.NullString Payload sql.NullString PayloadHash sql.NullString SourceAddress sql.NullString DestUserAddress sql.NullString DestContractAddress sql.NullString Amount sql.NullString Symbol sql.NullString RelayDataID uint `gorm:"foreignKey:ID;references:ID"` }
type ContractCallWithTokenApproved ¶
type ContractCallWithTokenApproved struct { ID string `gorm:"primaryKey"` CreatedAt sql.NullTime UpdatedAt sql.NullTime SourceChain sql.NullString DestinationChain sql.NullString TxHash sql.NullString BlockNumber sql.NullInt32 LogIndex sql.NullInt32 SourceAddress sql.NullString ContractAddress sql.NullString SourceTxHash sql.NullString SourceEventIndex sql.NullInt64 PayloadHash sql.NullString CommandId sql.NullString }
type IndexerClient ¶
type IndexerClient struct {
PgClient *PostgresClient
}
func (*IndexerClient) FindBlockEventsByAttribute ¶
func (c *IndexerClient) FindBlockEventsByAttribute(ctx context.Context, attribute string, values []string, options *Options) ([]models.BlockEvent, *types.Error)
func (*IndexerClient) FindEventAttributes ¶
func (c *IndexerClient) FindEventAttributes(ctx context.Context, eventIds []uint) (map[uint]MapBlockEventAttributes, *types.Error)
func (*IndexerClient) FindEventsByType ¶
func (c *IndexerClient) FindEventsByType(ctx context.Context, options *Options) ([]models.BlockEvent, *types.Error)
func (*IndexerClient) FindEventsByTypes ¶
func (c *IndexerClient) FindEventsByTypes(ctx context.Context, options *Options) ([]models.BlockEvent, *types.Error)
type MapBlockEventAttributes ¶
type PostgresClient ¶
func New ¶
func New(ctx context.Context, cfg config.PostgresDBConfig) (*PostgresClient, error)
type RelayData ¶
type RelayData struct { ID string `gorm:"primaryKey"` PacketSequence sql.NullInt32 ExecuteHash sql.NullString Status sql.NullInt32 From sql.NullString To sql.NullString CreatedAt sql.NullTime UpdatedAt sql.NullTime ContractCallID sql.NullInt32 `gorm:"foreignKey:ID;references:ID"` ContractCall ContractCall `gorm:"foreignKey:ID;references:ID"` ContractCallWithTokenID sql.NullInt32 `gorm:"foreignKey:ID;references:ID"` }
type RelayDataStatus ¶
type RelayDataStatus string
const ( Pending RelayDataStatus = "Pending" Approved RelayDataStatus = "Approved" Success RelayDataStatus = "Success" Failed RelayDataStatus = "Failed" Undefined RelayDataStatus = "Undefined" )
func ToReadableStatus ¶
func ToReadableStatus(status int) RelayDataStatus
type RelayerClient ¶
type RelayerClient struct {
PgClient *PostgresClient
}
func (*RelayerClient) GetContractCallParams ¶
func (c *RelayerClient) GetContractCallParams(ctx context.Context, messageIds []string) (map[string]ContractCall, *types.Error)
func (*RelayerClient) GetExecutedVaultBonding ¶
func (*RelayerClient) GetRelayerDatas ¶
type ScalarClient ¶
type ScalarClient struct {
// contains filtered or unexported fields
}
func NewScalarClient ¶
func NewScalarClient(scalarPostgresClient *PostgresClient) *ScalarClient
func (*ScalarClient) DeleteDApp ¶
func (s *ScalarClient) DeleteDApp(ID string) error
func (*ScalarClient) GetCustodialByName ¶
func (s *ScalarClient) GetCustodialByName(name string) (*models.Custodial, error)
func (*ScalarClient) GetCustodialByNames ¶
func (s *ScalarClient) GetCustodialByNames(names []string) ([]*models.Custodial, error)
func (*ScalarClient) GetCustodialGroupByID ¶
func (s *ScalarClient) GetCustodialGroupByID(id uint) (*models.CustodialGroup, error)
func (*ScalarClient) GetCustodialGroupByName ¶
func (s *ScalarClient) GetCustodialGroupByName(name string) (*models.CustodialGroup, error)
func (*ScalarClient) GetCustodialGroups ¶
func (s *ScalarClient) GetCustodialGroups() ([]*models.CustodialGroup, error)
func (*ScalarClient) GetCustodials ¶
func (s *ScalarClient) GetCustodials() ([]*models.Custodial, error)
func (*ScalarClient) GetShortenCustodialGroups ¶
func (s *ScalarClient) GetShortenCustodialGroups() ([]*models.ShortenCustodialGroup, error)
func (*ScalarClient) InitDApps ¶
func (s *ScalarClient) InitDApps(cfg config.InitDAppsConfig) error
func (*ScalarClient) SaveCustodial ¶
func (s *ScalarClient) SaveCustodial(custodial *models.Custodial) error
func (*ScalarClient) SaveCustodialGroup ¶
func (s *ScalarClient) SaveCustodialGroup(custodialGroup *models.CustodialGroup) error
func (*ScalarClient) ToggleDApp ¶
func (s *ScalarClient) ToggleDApp(ID string) error
func (*ScalarClient) UpdateDApp ¶
func (s *ScalarClient) UpdateDApp(dApp *models.DApp) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.