-
Notifications
You must be signed in to change notification settings - Fork 21
feat: 0.1.90 rust - generate #461
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| use crate::models; | ||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
| /// DrepsInnerMetadata : Off-chain metadata associated with the DRep's latest registration. `null` when the DRep has no registration anchor (e.g. special DReps such as `drep_always_abstain` / `drep_always_no_confidence`). When an anchor exists but the off-chain content could not be fetched or validated, `error` is populated and `json_metadata` / `bytes` are `null`. | ||
| #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] | ||
| pub struct DrepsInnerMetadata { | ||
| /// URL to the drep metadata | ||
| #[serde(rename = "url")] | ||
| pub url: String, | ||
| /// Hash of the metadata file | ||
| #[serde(rename = "hash")] | ||
| pub hash: String, | ||
| /// Content of the JSON metadata (validated CIP-119) | ||
| #[serde(rename = "json_metadata", deserialize_with = "Option::deserialize")] | ||
| pub json_metadata: Option<serde_json::Value>, | ||
| /// Content of the metadata (raw) | ||
| #[serde(rename = "bytes", deserialize_with = "Option::deserialize")] | ||
| pub bytes: Option<String>, | ||
| #[serde(rename = "error", skip_serializing_if = "Option::is_none")] | ||
| pub error: Option<Box<models::DrepsInnerMetadataError>>, | ||
| } | ||
|
|
||
| impl DrepsInnerMetadata { | ||
| /// Off-chain metadata associated with the DRep's latest registration. `null` when the DRep has no registration anchor (e.g. special DReps such as `drep_always_abstain` / `drep_always_no_confidence`). When an anchor exists but the off-chain content could not be fetched or validated, `error` is populated and `json_metadata` / `bytes` are `null`. | ||
| pub fn new(url: String, hash: String, json_metadata: Option<serde_json::Value>, bytes: Option<String>) -> DrepsInnerMetadata { | ||
| DrepsInnerMetadata { | ||
| url, | ||
| hash, | ||
| json_metadata, | ||
| bytes, | ||
| error: None, | ||
| } | ||
| } | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,14 +116,16 @@ pub mod drep_delegators_inner; | |
| pub use self::drep_delegators_inner::DrepDelegatorsInner; | ||
| pub mod drep_metadata; | ||
| pub use self::drep_metadata::DrepMetadata; | ||
| pub mod drep_metadata_error; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You remove Perhaps we need to add a dead code check? |
||
| pub use self::drep_metadata_error::DrepMetadataError; | ||
| pub mod drep_updates_inner; | ||
| pub use self::drep_updates_inner::DrepUpdatesInner; | ||
| pub mod drep_votes_inner; | ||
| pub use self::drep_votes_inner::DrepVotesInner; | ||
| pub mod dreps_inner; | ||
| pub use self::dreps_inner::DrepsInner; | ||
| pub mod dreps_inner_metadata; | ||
| pub use self::dreps_inner_metadata::DrepsInnerMetadata; | ||
| pub mod dreps_inner_metadata_error; | ||
| pub use self::dreps_inner_metadata_error::DrepsInnerMetadataError; | ||
| pub mod epoch_content; | ||
| pub use self::epoch_content::EpochContent; | ||
| pub mod epoch_param_content; | ||
|
|
@@ -268,6 +270,8 @@ pub mod script_json; | |
| pub use self::script_json::ScriptJson; | ||
| pub mod script_redeemers_inner; | ||
| pub use self::script_redeemers_inner::ScriptRedeemersInner; | ||
| pub mod script_utxos_inner; | ||
| pub use self::script_utxos_inner::ScriptUtxosInner; | ||
| pub mod scripts_inner; | ||
| pub use self::scripts_inner::ScriptsInner; | ||
| pub mod signer; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Seems valid, why is it not a compilation error?