Skip to content

Commit

Permalink
fix link examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Canvinus committed Mar 9, 2024
1 parent 2005598 commit 6781014
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions neps/nep-0330.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ Successful implementations of this standard will introduce a new (`ContractSour
The metadata will include optional fields:

- `version`: a string that references the specific commit ID or a tag of the code currently deployed on-chain. Examples: `"v0.8.1"`, `"a80bc29"`.
- `link`: an URL to the currently deployed code. It must include version or a tag if using a GitHub or a GitLab link. Examples: "https://github.com/near/near-cli-rs/releases/tag/v0.8.1", "https://github.com/near-examples/nft-tutorial/tree/39f2d2646f2f60e18ab53337501370dc02a5661c" or an IPFS CID.
- `link`: an URL to the currently deployed code. It must include version or a tag if using a GitHub or a GitLab link. Examples: "https://github.com/near/near-cli-rs/releases/tag/v0.8.1", "https://github.com/near/cargo-near-new-project-template/tree/9c16aaff3c0fe5bda4d8ffb418c4bb2b535eb420" or an IPFS CID.
- `standards`: a list of objects (see type definition below) that enumerates the NEPs supported by the contract. If this extension is supported, it is advised to also include NEP-330 version 1.1.0 in the list (`{standard: "nep330", version: "1.1.0"}`).
- `build_info`: a build details object (see type definition below) that contains all the necessary information about how the contract was built, making it possible for others to reproduce the same WASM of this contract.

```ts
type ContractSourceMetadata = {
version: string|null, // optional, commit hash being used for the currently deployed wasm. If the contract is not open-sourced, this could also be a numbering system for internal organization / tracking such as "1.0.0" and "2.1.0".
link: string|null, // optional, link to open source code such as a Github repository or a CID to somewhere on IPFS. e.g. git+https://github.com/near/cargo-near-new-project-template.git#9c16aaff3c0fe5bda4d8ffb418c4bb2b535eb420"
link: string|null, // optional, link to open source code such as a Github repository or a CID to somewhere on IPFS. e.g. "https://github.com/near/cargo-near-new-project-template/tree/9c16aaff3c0fe5bda4d8ffb418c4bb2b535eb420"
standards: Standard[]|null, // optional, standards and extensions implemented in the currently deployed wasm e.g. [{standard: "nep330", version: "1.1.0"},{standard: "nep141", version: "1.0.0"}].
build_info: BuildInfo|null, // optional, details that are required for contract WASM reproducibility.
}
Expand Down Expand Up @@ -76,7 +76,7 @@ As an example, consider a contract located at the root path of the repository, w
```ts
type ContractSourceMetadata = {
version: "1.0.0",
link: "https://github.com/near/cargo-near-new-project-template/commit/9c16aaff3c0fe5bda4d8ffb418c4bb2b535eb420",
link: "https://github.com/near/cargo-near-new-project-template/tree/9c16aaff3c0fe5bda4d8ffb418c4bb2b535eb420",
standards: [
{
standard: "nep330",
Expand All @@ -98,7 +98,7 @@ Calling the view function `contract_source_metadata`, the contract would return:
```bash
{
version: "1.0.0"
link: "https://github.com/near/cargo-near-new-project-template/commit/9c16aaff3c0fe5bda4d8ffb418c4bb2b535eb420",
link: "https://github.com/near/cargo-near-new-project-template/tree/9c16aaff3c0fe5bda4d8ffb418c4bb2b535eb420",
standards: [
{
standard: "nep330",
Expand Down

0 comments on commit 6781014

Please sign in to comment.