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

CSPR.cloud auth token support. #474

Merged
merged 1 commit into from
Jun 10, 2024
Merged

CSPR.cloud auth token support. #474

merged 1 commit into from
Jun 10, 2024

Conversation

zie1ony
Copy link
Contributor

@zie1ony zie1ony commented Jun 5, 2024

Summary by CodeRabbit

  • New Features

    • Added support for CSPR.cloud's authentication token.
    • Introduced the try_deploy function to handle contract deployments and failures.
    • Added the Cep18 standard for fungible tokens.
  • Documentation

    • Updated .env.sample to include settings for CSPR.cloud's RPC address and authentication token.
  • Chores

    • Added environment variables for CSPR.cloud node addresses and authentication token.

Copy link
Contributor

coderabbitai bot commented Jun 5, 2024

Walkthrough

The latest update from version 1.0.0 to 1.1.0 introduces significant enhancements, including support for CSPR.cloud's authentication token, a new try_deploy function for better contract deployment handling, and the integration of the Cep18 standard for fungible tokens. Environment configurations were updated to accommodate these changes, and modifications were made to the casper_client.rs to handle the new authentication mechanism.

Changes

File(s) Change Summary
CHANGELOG.md Documented the addition of CSPR.cloud auth token support, try_deploy function, and Cep18 standard for fungible tokens.
examples/.env.sample Updated to include CSPR.cloud RPC address and authentication token settings.
odra-casper/rpc-client/src/casper_client.rs Added environment variable for CSPR.cloud auth token, updated CasperClient struct, and modified post_request method.

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant User
    participant .env.sample
    participant CasperClient
    participant CSPR.cloud

    User->>.env.sample: Add CSPR_CLOUD_AUTH_TOKEN
    User->>CasperClient: Initialize with auth token
    CasperClient->>CSPR.cloud: Send request with auth token
    CSPR.cloud-->>CasperClient: Authenticated response
    CasperClient-->>User: Processed response
Loading

Poem

In the land of code so bright,
New tokens take their flight,
Deployer's dance with contracts bold,
CSPR.cloud secrets to unfold.
Cep18, the tokens sing,
In Odra's world, they bring a zing!
🌟🚀✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between cdf5479 and 1459e7b.

Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • examples/.env.sample (2 hunks)
  • odra-casper/rpc-client/src/casper_client.rs (4 hunks)
Files skipped from review due to trivial changes (1)
  • examples/.env.sample
Additional context used
LanguageTool
CHANGELOG.md

[grammar] ~9-~9: You’ve repeated a verb. Did you mean to only write one of them? (REPEATED_VERBS)
Context: ...uth token. ## [1.0.0] - 2024-05-23 ### Added - Add try_deploy function to the Deployer...


[style] ~13-~13: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...- a standard for non-fungible tokens. - Add cep18 and cep78 templates. ### Cha...


[grammar] ~46-~46: Did you mean “disabling”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun. (ALLOW_TO)
Context: ...orfeature forodra` crate. It allows to disable the allocator used by Odra Framework in...


[style] ~74-~74: ‘taken into account’ might be wordy. Consider a shorter alternative. (EN_WORDINESS_PREMIUM_TAKEN_INTO_ACCOUNT)
Context: ...s been renamed to Var. - Spent Gas is taken into account when checking an account balance. This ...


[duplication] ~85-~85: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...is the only code generation point. ### Removed - Removed #[odra::init] macro - now only one me...


[style] ~98-~98: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...-casper-shared, odra-utilscrates. - RemovedOdraEventtrait,odrareexportsca...


[uncategorized] ~101-~101: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...in test env withContractCallResult` struct which holds all information about the l...


[style] ~106-~106: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...tionalities. - odra-casper-rcp-client crate providing CasperClient for interactin...


[style] ~107-~107: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...sper node. - odra-casper-livenet-env crate providing a host environment fo for the...


[uncategorized] ~124-~124: Possible missing preposition found. (AI_HYDRA_LEO_MISSING_OF)
Context: ...WASM. - odra-types are the only types crate. ### Removed - Removed `odra-casper-ty...


[duplication] ~126-~126: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...a-typesare the only types crate. ### Removed - Removedodra-casper-typesandodra-mock-vm-t...


[uncategorized] ~159-~159: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...oxy_caller.wasm. - odra-casper-shared, odra-casper-typesandodra-types` ar...


[uncategorized] ~190-~190: Possible missing article found. (AI_HYDRA_LEO_MISSING_A)
Context: ...t_exception!macro. It no longer needs new instance of Ref. ### Changed -transf...


[uncategorized] ~198-~198: Possible missing article found. (AI_HYDRA_LEO_MISSING_A)
Context: ...- new module - Sequence - for storing single value in the storage that can be increm...


[uncategorized] ~201-~201: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...les and Mappings now can be a part of a Mapping allowing to nest them. - Namespaces can...


[style] ~235-~235: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...s, moved from odra-casper-backend. - New crate odra-casper-types - encapsulate...


[typographical] ~258-~258: Consider adding a comma here. (NN_NOT_NN_COMMA)
Context: ... - contract_env and test_env are modules not structs. - To deploy contract i...


[uncategorized] ~279-~279: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...en()functions. -odra-casper-backend, odra-casper-shared, odra-casper-test...


[style] ~311-~311: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ... addition, and subtraction. - event module that defines an event interface and com...


[style] ~312-~312: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...rface and companion errors. - error module encapsulates errors that may occur duri...


[uncategorized] ~326-~326: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...ntations used to run tests. - MockVM, a lightweight blockchain virtual machin...


[style] ~331-~331: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ... Procedural macro odra::instance. - Procedural macro odra::external_contract. - Pr...


[style] ~332-~332: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...al macro odra::external_contract. - Procedural macro odra::execution_error. - Proc...


[style] ~333-~333: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Context: ...ural macro odra::execution_error. - Procedural macro odra::odra_error. - Derive ma...

Markdownlint
CHANGELOG.md

284-284: Expected: 4; Actual: 2 (MD005, list-indent)
Inconsistent indentation for list items at the same level


239-239: Expected: 2; Actual: 3 (MD007, ul-indent)
Unordered list indentation


240-240: Expected: 2; Actual: 3 (MD007, ul-indent)
Unordered list indentation


241-241: Expected: 2; Actual: 3 (MD007, ul-indent)
Unordered list indentation


242-242: Expected: 2; Actual: 3 (MD007, ul-indent)
Unordered list indentation


243-243: Expected: 2; Actual: 3 (MD007, ul-indent)
Unordered list indentation


252-252: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


253-253: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


254-254: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


255-255: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


256-256: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


257-257: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


258-258: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


259-259: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


260-260: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


281-281: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


282-282: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


283-283: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation


78-78: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


102-102: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


106-106: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


167-167: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


234-234: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


4-4: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


4-4: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


5-5: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


5-5: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


8-8: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


9-9: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


9-9: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


15-15: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


20-20: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


21-21: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


21-21: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


24-24: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


25-25: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


25-25: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


35-35: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


40-40: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


43-43: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


44-44: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


44-44: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


50-50: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


55-55: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


85-85: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


100-100: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


115-115: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


121-121: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


122-122: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


122-122: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


126-126: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


130-130: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


131-131: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


131-131: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


135-135: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


138-138: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


139-139: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


139-139: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


146-146: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


151-151: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


156-156: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


157-157: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


157-157: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


163-163: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


166-166: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


172-172: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


176-176: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


177-177: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


177-177: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


186-186: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


192-192: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


196-196: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


197-197: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


197-197: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


216-216: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


220-220: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


223-223: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


224-224: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


224-224: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


250-250: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


289-289: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


294-294: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


295-295: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


295-295: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


298-298: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


299-299: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


299-299: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


60-60: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


62-62: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


64-64: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


66-66: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines


6-6: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


10-10: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


16-16: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


22-22: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


26-26: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


36-36: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


41-41: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


45-45: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


51-51: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


56-56: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


59-59: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


67-67: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


86-86: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


101-101: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


116-116: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


123-123: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


127-127: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


132-132: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


136-136: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


140-140: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


147-147: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


152-152: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


158-158: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


164-164: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


167-167: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


173-173: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


178-178: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


187-187: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


193-193: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


198-198: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


217-217: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


221-221: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


225-225: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


251-251: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


290-290: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


296-296: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


300-300: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines


41-41: null (MD034, no-bare-urls)
Bare URL used

Additional comments not posted (4)
CHANGELOG.md (1)

4-7: The changelog entry for version 1.1.0 is clear and accurately reflects the addition of CSPR.cloud's auth token support.

Tools
Markdownlint

4-4: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


4-4: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


5-5: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


5-5: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


6-6: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines

odra-casper/rpc-client/src/casper_client.rs (3)

93-93: Validate the optional environment variable retrieval for cspr_cloud_auth_token.

The use of get_optional_env_variable for cspr_cloud_auth_token is appropriate as it allows the token to be optional, aligning with typical authentication token handling practices.


747-750: Review the handling of the CSPR.cloud auth token in HTTP headers.

The conditional addition of the "Authorization" header based on the presence of cspr_cloud_auth_token is correctly implemented. This ensures that the token is only sent when available, maintaining security and functionality.


68-68: Ensure proper handling of cspr_cloud_auth_token initialization.

Comment on lines +47 to +48
/// Environment variable holding cspr.cloud auth token.
pub const ENV_CSPR_CLOUD_AUTH_TOKEN: &str = "CSPR_CLOUD_AUTH_TOKEN";
Copy link
Contributor

Choose a reason for hiding this comment

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

Add documentation for ENV_CSPR_CLOUD_AUTH_TOKEN.

It's good practice to document the purpose and usage of each environment variable, especially for new additions like ENV_CSPR_CLOUD_AUTH_TOKEN. This helps maintain clarity and usability of the code.

@kpob kpob linked an issue Jun 10, 2024 that may be closed by this pull request
@zie1ony zie1ony merged commit ab21b72 into release/1.1.0 Jun 10, 2024
4 checks passed
@zie1ony zie1ony deleted the feature/cspr-cloud branch June 10, 2024 06:57
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.

Support cspr.cloud as RPC
2 participants