Skip to content
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

Initialize nonce manager. #77

Merged
merged 6 commits into from
Aug 28, 2024
Merged

Initialize nonce manager. #77

merged 6 commits into from
Aug 28, 2024

Conversation

winder
Copy link
Contributor

@winder winder commented Aug 23, 2024

Add bindings for the NonceManager and finish implementing the CCIPReader.

@winder winder force-pushed the will/8-nonces-reader branch from cc4684f to 338b35f Compare August 23, 2024 19:55
internal/reader/ccip.go Outdated Show resolved Hide resolved
return resp, nil
}

type offrampStaticChainConfig struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put link to the offramp type? Will make it easier to find it.

Copy link
Contributor Author

@winder winder Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, what did you have in mind? A comment? I copied the pattern used for type sourceChainConfig struct {, so I'll update that as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A permalink to the solidity struct would be good enough IMO

Copy link
Collaborator

@makramkd makramkd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can write an integration test to test that this works in the ccipreader_test.go file in chainlink/ccip. See TestCCIPReader_CommitReportsGTETimestamp as an example.

internal/reader/ccip.go Outdated Show resolved Hide resolved
Comment on lines +627 to +719
ChainSelector uint64 `json:"chainSelector"`
RmnProxy []byte `json:"rmnProxy"`
TokenAdminRegistry []byte `json:"tokenAdminRegistry"`
NonceManager []byte `json:"nonceManager"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

json tags should not be required

Co-authored-by: Makram <[email protected]>
Co-authored-by: Abdelrahman Soliman (Boda) <[email protected]>
@winder winder marked this pull request as ready for review August 28, 2024 15:39
@winder winder requested a review from a team as a code owner August 28, 2024 15:39
return nil
}

func (r *CCIPChainReader) Sync(ctx context.Context) (bool, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dimkouv why the (bool, error) return signature? I feel like error is enough?

return resp, nil
}

type offrampStaticChainConfig struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A permalink to the solidity struct would be good enough IMO

Copy link

Test Coverage

Branch Coverage
will/8-nonces-reader 61.7%
ccip-develop 52.2%

@winder winder merged commit df61360 into ccip-develop Aug 28, 2024
3 checks passed
@winder winder deleted the will/8-nonces-reader branch August 28, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants