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

chore(near-contract-standards): add build_info field #1297

Merged
merged 4 commits into from
Feb 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
review: comments
  • Loading branch information
dj8yf0μl committed Feb 3, 2025
commit f13180eb2b034c5d5b469a42841ce04741db315d
18 changes: 15 additions & 3 deletions near-contract-standards/src/contract_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ pub struct ContractSourceMetadata {
/// Some("1.0.0".into())
/// # ;
/// ```
/// ```rust,no_run
/// # let version: Option<String> =
/// // Git commit
/// Some("39f2d2646f2f60e18ab53337501370dc02a5661c".into())
/// # ;
/// ```
pub version: Option<String>,
/// Optional URL to source code repository/tree
///
Expand All @@ -29,13 +35,19 @@ pub struct ContractSourceMetadata {
/// ```rust,no_run
/// # let link: Option<String> =
/// // GitHub URL
/// Some("https://github.com/near-examples/nft-tutorial".into())
/// Some("https://github.com/org/repo/tree/8d8a8a0fe86a1d8eb3bce45f04ab1a65fecf5a1b".into())
/// # ;
/// ```
/// ```rust,no_run
/// # let link: Option<String> =
/// // GitHub URL
/// Some("https://github.com/org/repo/tree/8d8a8a0fe86a1d8eb3bce45f04ab1a65fecf5a1b".into())
/// Some("https://github.com/near-examples/nft-tutorial".into())
/// # ;
/// ```
/// ```rust,no_run
/// # let link: Option<String> =
/// // IPFS CID
/// Some("bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq".into())
/// # ;
/// ```
pub link: Option<String>,
Expand Down Expand Up @@ -99,7 +111,7 @@ mod build_info {
use near_sdk::serde::{Deserialize, Serialize};

/// Defines all required details for formal WASM build reproducibility verification
/// according to [**NEP-330 standard**](https://github.com/near/NEPs/blob/master/neps/nep-0330.md)
/// according to [**NEP-330 standard 1.2.0 revision**](https://github.com/near/NEPs/blob/master/neps/nep-0330.md)
#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
#[serde(crate = "near_sdk::serde")]
pub struct BuildInfo {
Expand Down
Loading