-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rearrange Relayer Chain interactions interfaces #903
base: main
Are you sure you want to change the base?
Conversation
24e8a40
to
34d7a88
Compare
34d7a88
to
8286a75
Compare
8286a75
to
51ba2fc
Compare
51ba2fc
to
6a3ac42
Compare
|
||
// NewContractReader returns a new ContractReader. | ||
// The format of contractReaderConfig depends on the implementation. | ||
NewContractReader(ctx context.Context, contractReaderConfig []byte) (types.ContractReader, error) | ||
NewConfigProvider(context.Context, types.RelayArgs) (types.ConfigProvider, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this contain the chainService? Have to check how Relayer interface is used
type ContractWriter = ChainWriter | ||
|
||
// Deprecated: Use ContractWriter instead. | ||
type ChainWriter interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swapping these makes the "correct" type more direct and sets up removal to be a little cleaner later 🤷
type ContractWriter = ChainWriter | |
// Deprecated: Use ContractWriter instead. | |
type ChainWriter interface { | |
// Deprecated: Use ContractWriter instead. | |
type ChainWriter = ContractWriter | |
type ContractWriter interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, didn't realise that was legal
// LatestHead returns the latest head for the underlying chain. | ||
LatestHead(ctx context.Context) (Head, error) | ||
// GetChainStatus returns the ChainStatus for this Relayer. | ||
GetChainStatus(ctx context.Context) (ChainStatus, error) | ||
// ListNodeStatuses returns the status of RPC nodes. | ||
ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []NodeStatus, nextPageToken string, total int, err error) | ||
} | ||
|
||
type IChainWriter interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bummer... 🤔 We could rename it later of course - are you planning to do that? Or leave the deprecated type around for a while?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everyone that has context on this is slammed with work, I've been chipping away at the backlog when I have time. Maybe I'll do it, or I'll try to somehow reprioritise the backlog.
6a3ac42
to
4eaa82c
Compare
Requires
Supports