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

feat: Added ability to use SourceScan #134

Merged
merged 42 commits into from
Jul 30, 2024
Merged

feat: Added ability to use SourceScan #134

merged 42 commits into from
Jul 30, 2024

Conversation

FroVolod
Copy link
Collaborator

Resolves #131

FroVolod and others added 18 commits February 23, 2024 09:57
Passing uid, gid to container to preserve the privileges the same as for
host system, while building to mounted volume from host.

- [append timestamp and pid to container name to make it
unique](fdc5ee6)
- [use image with non-root user
builder](f3c3b11)
- [implement cross-platform uid,gid support with platform-specific
dependencies](40f98ba)
this adds ability to configure image via
[`Cargo.toml`](https://github.com/dj8yfo/sample_no_workspace/blob/set_metadata/Cargo.toml#L14-L16)
:

```toml
[package.metadata.near.reproducible_build]
image = "docker.io/sourcescan/cargo-near:0.6.0-builder"
image_digest = "sha256:d21001ebc889478deac105a07efbefcd667d6a2e927e8ea5f1526cd1877ae84a"
```

`cargo` doesn't automatically populate `package.metadata` with
`workspace.metadata`
near-examples/update-migrate-rust@d3259c3

```bash
        # package
        ...
        metadata: Object {
            "near": Object {
                "reproducible_build": Object {
                    "image": Object {
                        "workspace": Bool(true),
                    },
                },
            },
        },
        ...
        # workspace
        workspace_metadata: Object {
            "near": Object {
                "reproducible_build": Object {
                    "image": String("docker.io/sourcescan/cargo-near:0.6.0@sha256:bf488476d9c4e49e36862bbdef2c595f88d34a295fd551cc65dc291553849471"),
                },
            },
        },
```
dj8yfo and others added 6 commits April 19, 2024 00:32
…docker` flow (#153)

Following has been compared to `--no-docker` counterparts, 
they produce the same output `*.wasm` paths (`*.json` and `*.zst` aren't
produced
as result of a build).
Tested on
https://github.com/dj8yfo/sample_no_workspace/tree/set_metadata_with_repo
.

- [x] without arg
  - [x] `cargo near build --no-abi`
  - [x] `cargo near build `
  - [x] `cargo near deploy` 
- [x] with arg
- [x] `cargo near build --no-abi --out-dir
/path/to/tmp_build_destination`
   - [x] `cargo near build  --out-dir /path/to/tmp_build_destination`
   - [x] `cargo near deploy --out-dir /path/to/tmp_build_destination`


![Screenshot_20240419_230137](https://github.com/near/cargo-near/assets/26653921/de7dcffa-8c30-4993-9406-f4589cccd289)
dj8yfo and others added 4 commits May 10, 2024 10:39
Summary of changes:
- `git dirty` check copied to `cargo near build` flow, it produces a
warning, unlike the error in `cargo near deploy` flow
- added `source_code_git_url` field to reproducible build metadata
- `git pushed to remote` check logic reworked
- repo is opened and `HEAD` is determined
- relative path of contract within repo is determined
- `CARGO_NEAR_SOURCE_CODE_SNAPSHOT` (adapted from
[cargo::core::SourceId](https://docs.rs/cargo/latest/cargo/core/struct.SourceId.html))
and `CARGO_NEAR_CONTRACT_PATH` are exported into container
- [x] github, package in root of a repo:
https://github.com/dj8yfo/sample_no_workspace/tree/6c5ae44150ce51349a95e1605ba053c4fe53cf28
- [x] github, package in subpath in repo :
https://github.com/dj8yfo/sample_workspace/tree/b2d5580037c84fd4038b467564a9be9e520611de/self-updates/update
- [x] github, package in submodule in repo :
https://github.com/dj8yfo/sample_workspace_with_submodules/tree/3d87c81517e1e23a5716c300fe4789b1aafc4c6f/self-updates
- [x] bitbucket, package in root of a repo:
https://bitbucket.org/dj8yfomule/scratch_check_git/src/master/


![Screenshot_20240503_204916](https://github.com/near/cargo-near/assets/26653921/046dca51-accb-4838-9eb0-5ae531cf4a59)
commit
ca13500
was lost in merge of #159, as it
was accidentally not pushed to remote before merge,
which was discovered when testing on
[contract](https://github.com/dj8yfo/sample_no_workspace/blob/d42d1c69a3883889c4bb688b11e0a8dffb384a15/Cargo.toml)

---

SIDENOTE: commit
787c3a4
fixes somewhat unrelated problem, also present in `main` .
It can be cherry-picked into a standalone pr to `main` :

as `cargo metadata` is called without any additional args (`--features`
or whatnot), the following diff:

```diff
-near-sdk = { version = "5.1.0", features = ["legacy"], git = "https://github.com/dj8yfo/near-sdk-rs.git", branch = "add_contract_metadata" }
+near-sdk = { version = "5.1.0", default-features = false, features = ["wee_alloc", "legacy"], git = "https://github.com/dj8yfo/near-sdk-rs.git", branch = "add_contract_metadata" }
```
results in 
```bash
Error:
   0: `near-sdk` dependency must have the `abi` feature enabled
```
which somewhat contradicts [no explicit `abi`
feature](https://github.com/near-examples/factory-rust/blob/main/Cargo.toml#L16)
, which is promoted for use by
[near-docs](https://github.com/near-examples/factory-rust/pull/2/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R74)

---------

Co-authored-by: Jacob Lindahl <encody@users.noreply.github.com>
git(source-scan): create empty merge commit
dj8yfo and others added 2 commits June 19, 2024 08:38
fast-forward extension of #164 

1.
[Cargo.toml](https://github.com/dj8yfo/sample_no_workspace/blob/1fd39bcbe4d523ac26c3d07c1f49ecc0fc65d9e7/Cargo.toml)
=> `sample-crate-12.testnet`
<details>
  <summary>contract_source_metadata</summary><p>

  ```json
  {
    "build_info": {
      "build_command": [
        "cargo",
        "near",
        "build",
        "--no-default-features",
        "--features",
        "near-sdk/expensive-debug"
      ],
"build_environment":
"dj8yfo/sourcescan:0.x.x-dev-cargo-near-finalization@sha256:f86a095cb3daed21d0b5f86a4b5d9da0c0e26835f85c42678e1d460c9caa2c12",
      "contract_path": "",
"source_code_snapshot":
"git+https://github.com/dj8yfo/sample_no_workspace.git?rev=1fd39bcbe4d523ac26c3d07c1f49ecc0fc65d9e7"
    },
"link":
"https://github.com/dj8yfo/sample_no_workspace/tree/1fd39bcbe4d523ac26c3d07c1f49ecc0fc65d9e7",
    "standards": [
      {
        "standard": "nep330",
        "version": "1.2.0"
      }
    ],
    "version": "0.7.7"
  }    
  ```
  
</p>
</details>

2.
[Cargo.toml](https://github.com/dj8yfo/sample_workspace/blob/86aa6ccf4610f072cd207db86869e6324779780f/self-updates/update/Cargo.toml)
=> `sample-subpath-in-repo-6.testnet`
<details>
  <summary>contract_source_metadata</summary><p>

  ```json
  {
    "build_info": {
      "build_command": [
        "cargo",
        "near",
        "build",
        "--no-release",
        "--no-doc"
      ],
"build_environment":
"dj8yfo/sourcescan:0.x.x-dev-cargo-near-finalization@sha256:f86a095cb3daed21d0b5f86a4b5d9da0c0e26835f85c42678e1d460c9caa2c12",
      "contract_path": "self-updates/update",
"source_code_snapshot":
"git+https://github.com/dj8yfo/sample_workspace.git?rev=86aa6ccf4610f072cd207db86869e6324779780f"
    },
"link":
"https://github.com/dj8yfo/sample_workspace/tree/86aa6ccf4610f072cd207db86869e6324779780f",
    "standards": [
      {
        "standard": "nep330",
        "version": "1.2.0"
      }
    ],
    "version": "1.7.7"
  }
  ```
  
</p>
</details>

3. [dir containing
submodule](https://github.com/dj8yfo/sample_workspace_with_submodules/tree/4b466921b89df67d6e8d1f9956b55a677edb2497/self-updates)
=> `sample-crate-in-submodule-5.testnet`
<details>
  <summary>contract_source_metadata</summary><p>

  ```json
  {
    "build_info": {
      "build_command": [
        "cargo",
        "near",
        "build",
        "--no-release",
        "--no-doc"
      ],
"build_environment":
"dj8yfo/sourcescan:0.x.x-dev-cargo-near-finalization@sha256:f86a095cb3daed21d0b5f86a4b5d9da0c0e26835f85c42678e1d460c9caa2c12",
      "contract_path": "self-updates/update",
"source_code_snapshot":
"git+https://github.com/dj8yfo/sample_workspace_with_submodules.git?rev=4b466921b89df67d6e8d1f9956b55a677edb2497"
    },
"link":
"https://github.com/dj8yfo/sample_workspace_with_submodules/tree/4b466921b89df67d6e8d1f9956b55a677edb2497",
    "standards": [
      {
        "standard": "nep330",
        "version": "1.2.0"
      }
    ],
    "version": "1.0.0"
  }
  ```
  
</p>
</details>

4.
[Cargo.toml](https://bitbucket.org/dj8yfomule/scratch_check_git/src/finalization/Cargo.toml)
=> `bitbucket-scratch-4.testnet`
<details>
  <summary>contract_source_metadata</summary><p>

  ```json
  {
    "build_info": {
      "build_command": [
        "cargo",
        "near",
        "build",
        "--no-release",
        "--no-doc"
      ],
"build_environment":
"dj8yfo/sourcescan:0.x.x-dev-cargo-near-finalization@sha256:f86a095cb3daed21d0b5f86a4b5d9da0c0e26835f85c42678e1d460c9caa2c12",
      "contract_path": "",
"source_code_snapshot":
"git+https://feepdake27@bitbucket.org/dj8yfomule/scratch_check_git.git?rev=af9e835380053205f7fcc9b232a7ebb1c2c20694"
    },
"link":
"https://bitbucket.org/dj8yfomule/scratch_check_git/src/finalization/",
    "standards": [
      {
        "standard": "nep330",
        "version": "1.2.0"
      }
    ],
    "version": "0.1.0"
  }
  ```
  
</p>
</details>

5. factory
[Cargo.toml](https://github.com/dj8yfo/factory-rust/blob/62a34ac86e6323ee6351b20fded7fc668b1e0277/factory/Cargo.toml)
=> `repro-fct-19.testnet`
<details>
  <summary>contract_source_metadata</summary><p>

  ```json
  {
    "build_info": {
      "build_command": [
        "cargo",
        "near",
        "build",
        "--no-default-features",
        "--features",
        "near-sdk/expensive-debug"
      ],
"build_environment":
"dj8yfo/sourcescan:0.x.x-dev-cargo-near-finalization@sha256:f86a095cb3daed21d0b5f86a4b5d9da0c0e26835f85c42678e1d460c9caa2c12",
      "contract_path": "factory",
"source_code_snapshot":
"git+https://github.com/dj8yfo/factory-rust.git?rev=62a34ac86e6323ee6351b20fded7fc668b1e0277"
    },
"link":
"https://github.com/dj8yfo/factory-rust/tree/62a34ac86e6323ee6351b20fded7fc668b1e0277",
    "standards": [
      {
        "standard": "nep330",
        "version": "1.2.0"
      }
    ],
    "version": "0.1.13"
  }
  ```
  
</p>
</details>

6. `repro-fct-19.testnet` => product
`donation-product.repro-fct-19.testnet`
<details>
  <summary>contract_source_metadata</summary><p>

  ```json
  {
    "build_info": {
      "build_command": [
        "cargo",
        "near",
        "build"
      ],
"build_environment":
"dj8yfo/sourcescan:0.x.x-dev-cargo-near-finalization@sha256:f86a095cb3daed21d0b5f86a4b5d9da0c0e26835f85c42678e1d460c9caa2c12",
      "contract_path": "product-donation",
"source_code_snapshot":
"git+https://github.com/dj8yfo/factory-rust.git?rev=62a34ac86e6323ee6351b20fded7fc668b1e0277"
    },
"link":
"https://github.com/dj8yfo/factory-rust/tree/62a34ac86e6323ee6351b20fded7fc668b1e0277",
    "standards": [
      {
        "standard": "nep330",
        "version": "1.2.0"
      }
    ],
    "version": "0.2.9"
  }
  ```
  
</p>
</details>

7. product
[Cargo.toml](https://github.com/dj8yfo/factory-rust/blob/62a34ac86e6323ee6351b20fded7fc668b1e0277/product-donation/Cargo.toml)
=> `repro-fct-product-19.testnet`
<details>
  <summary>contract_source_metadata</summary><p>

  ```json
  {
    "build_info": {
      "build_command": [
        "cargo",
        "near",
        "build"
      ],
"build_environment":
"dj8yfo/sourcescan:0.x.x-dev-cargo-near-finalization@sha256:f86a095cb3daed21d0b5f86a4b5d9da0c0e26835f85c42678e1d460c9caa2c12",
      "contract_path": "product-donation",
"source_code_snapshot":
"git+https://github.com/dj8yfo/factory-rust.git?rev=62a34ac86e6323ee6351b20fded7fc668b1e0277"
    },
"link":
"https://github.com/dj8yfo/factory-rust/tree/62a34ac86e6323ee6351b20fded7fc668b1e0277",
    "standards": [
      {
        "standard": "nep330",
        "version": "1.2.0"
      }
    ],
    "version": "0.2.9"
  }
  ```
  
</p>
</details>
dj8yfo and others added 3 commits July 5, 2024 17:03
this
[line](https://github.com/near/cargo-near/blob/main/integration-tests/src/lib.rs#L59)
was fluke-nuking
the added test, 

due to following commands

```bash
export CARGO_TARGET_DIR=/home/target
cargo metadata
```

corrupting `cargo metadata` output,
so the new test was put into a separate binary.

![Screenshot_20240703_203008](https://github.com/near/cargo-near/assets/26653921/2854b7ad-edc4-4b53-99d9-6a78fc9c5f80)
git: (WARN: requires create merge commit strategy) merge updates from `main`
@dj8yfo
Copy link
Collaborator

dj8yfo commented Jul 9, 2024

@race-of-sloths, please include this PR in the race

@race-of-sloths
Copy link

race-of-sloths commented Jul 9, 2024

@FroVolod Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
New Sloth joined the Race! Welcome!

Shows profile picture for the author of the PR

Current status: executed
Reviewer Score
@dj8yfo 13

The average score is 13

@FroVolod check out your results on the Race of Sloths Leaderboard! and in the profile

What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow

For contributors:

  • Tag @race-of-sloths inside your pull requests
  • Wait for the maintainer to review and score your pull request
  • Check out your position in the Leaderboard
  • Keep weekly and monthly streaks to reach higher positions
  • Boast your contributions with a dynamic picture of your Profile

For maintainers:

  • Score pull requests that participate in the Race of Sloths
  • Engage contributors with fair scoring and fast responses so they keep their streaks
  • Promote the Race to the point where the Race starts promoting you
  • Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands
  • For contributors
    • Include a PR: @race-of-sloths include to enter the Race with your PR
  • For maintainers:
    • Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
    • Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
    • Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called

@dj8yfo
Copy link
Collaborator

dj8yfo commented Jul 9, 2024

@race-of-sloths score 13

@race-of-sloths
Copy link

🌟 Score recorded!

@dj8yfo, thank you for scoring this pull request in the Race of Sloths!

dj8yf0μl and others added 7 commits July 9, 2024 20:10
…example suggestion (#179)

![photo_2024-07-05_13-27-45
(2)](https://github.com/user-attachments/assets/81503255-de4f-4fcf-a154-5b6a08cff46f)


![2024-07-12_17-02](https://github.com/user-attachments/assets/a074c67c-b9c0-41dc-9e30-89a7bad2fc00)

![2024-07-12_20-26](https://github.com/user-attachments/assets/f755b149-cb00-4135-9c57-ed1f4ca0a892)


- [x]
[Cargo.toml](https://github.com/dj8yfo/sample_no_workspace/blob/241d6a2c313488e4d037fbc3cbca2763285de04d/Cargo.toml#L9-L26)
=> sample-crate-34.testnet

<details>
  <summary>sample-crate-34.testnet</summary><p>
  
```json
{
  "build_info": {
    "build_command": [
      "cargo",
      "near",
      "build"
    ],
    "build_environment": "dj8yfo/sourcescan:0.x.x-dev-git-pull-179-ccache-cut-single@sha256:b46ea2c26ef5762c0675aa3563bd38aa045366c27a9918867a2455c83c8b046a",
    "contract_path": "",
    "source_code_snapshot": "git+https://github.com/dj8yfo/sample_no_workspace?rev=241d6a2c313488e4d037fbc3cbca2763285de04d"
  },
  "link": "https://github.com/dj8yfo/sample_no_workspace/tree/241d6a2c313488e4d037fbc3cbca2763285de04d",
  "standards": [
    {
      "standard": "nep330",
      "version": "1.2.0"
    }
  ],
  "version": "0.7.7"
}
```

</p></details>

- [x]
[Cargo.toml](https://github.com/dj8yfo/sample_workspace/blob/49b40d149f5e595c3e0e4862c08eeb16b2a7d0d3/self-updates/update/Cargo.toml#L6-L22)
=> sample-subpath-in-repo-13.testnet

<details>
  <summary>sample-subpath-in-repo-13.testnet</summary><p>
  
```json
{
  "build_info": {
    "build_command": [
      "cargo",
      "near",
      "build"
    ],
    "build_environment": "dj8yfo/sourcescan:0.x.x-dev-git-pull-179-ccache-cut-single@sha256:b46ea2c26ef5762c0675aa3563bd38aa045366c27a9918867a2455c83c8b046a",
    "contract_path": "self-updates/update",
    "source_code_snapshot": "git+https://github.com/dj8yfo/sample_workspace?rev=49b40d149f5e595c3e0e4862c08eeb16b2a7d0d3"
  },
  "link": "https://github.com/dj8yfo/sample_workspace/tree/49b40d149f5e595c3e0e4862c08eeb16b2a7d0d3",
  "standards": [
    {
      "standard": "nep330",
      "version": "1.2.0"
    }
  ],
  "version": "1.7.7"
}
```

</p></details>

- [x] [dir containing
submodule](https://github.com/dj8yfo/sample_workspace_with_submodules/tree/e00bd4907e4a3f1fe35653a8843bcb481b3eaf94/self-updates)
=> sample-crate-in-submodule-13.testnet

<details>
  <summary>sample-crate-in-submodule-13.testnet</summary><p>
  
```json
{
  "build_info": {
    "build_command": [
      "cargo",
      "near",
      "build"
    ],
    "build_environment": "dj8yfo/sourcescan:0.x.x-dev-git-pull-179-ccache-cut-single@sha256:b46ea2c26ef5762c0675aa3563bd38aa045366c27a9918867a2455c83c8b046a",
    "contract_path": "self-updates/update",
    "source_code_snapshot": "git+https://github.com/dj8yfo/sample_workspace_with_submodules?rev=e00bd4907e4a3f1fe35653a8843bcb481b3eaf94"
  },
  "link": "https://github.com/dj8yfo/sample_workspace_with_submodules/tree/e00bd4907e4a3f1fe35653a8843bcb481b3eaf94",
  "standards": [
    {
      "standard": "nep330",
      "version": "1.2.0"
    }
  ],
  "version": "1.0.0"
}
```

</p></details>

- [x]
[Cargo.toml](https://bitbucket.org/dj8yfomule/scratch_check_git/src/f9e71feab15d2952f3baedcd2f0c642fe0db1ad8/Cargo.toml#lines-9:28)
=> bitbucket-scratch-11.testnet

<details>
  <summary>bitbucket-scratch-11.testnet</summary><p>
  
```json
{
  "build_info": {
    "build_command": [
      "cargo",
      "near",
      "build"
    ],
    "build_environment": "dj8yfo/sourcescan:0.x.x-dev-git-pull-179-ccache-cut-single@sha256:b46ea2c26ef5762c0675aa3563bd38aa045366c27a9918867a2455c83c8b046a",
    "contract_path": "",
    "source_code_snapshot": "git+https://bitbucket.org/dj8yfomule/scratch_check_git?rev=f9e71feab15d2952f3baedcd2f0c642fe0db1ad8"
  },
  "link": "https://bitbucket.org/dj8yfomule/scratch_check_git",
  "standards": [
    {
      "standard": "nep330",
      "version": "1.2.0"
    }
  ],
  "version": "0.1.0"
}
```

</p></details>

- [x] factory
[Cargo.toml](https://github.com/dj8yfo/factory-rust/blob/1695790693f1058a70d4edc54144a94570e199bd/factory/Cargo.toml#L6-L22)
=> repro-fct-35.testnet

<details>
  <summary>repro-fct-35.testnet</summary><p>
  
```json
{
  "build_info": {
    "build_command": [
      "cargo",
      "near",
      "build"
    ],
    "build_environment": "dj8yfo/sourcescan:0.x.x-dev-git-pull-179-ccache-cut-single@sha256:b46ea2c26ef5762c0675aa3563bd38aa045366c27a9918867a2455c83c8b046a",
    "contract_path": "factory",
    "source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=1695790693f1058a70d4edc54144a94570e199bd"
  },
  "link": "https://github.com/dj8yfo/factory-rust/tree/1695790693f1058a70d4edc54144a94570e199bd",
  "standards": [
    {
      "standard": "nep330",
      "version": "1.2.0"
    }
  ],
  "version": "0.1.13"
}
```

</p></details>

- [x] repro-fct-35.testnet => product
donation-product.repro-fct-35.testnet

<details>
  <summary>donation-product.repro-fct-35.testnet</summary><p>

```json
{
  "build_info": {
    "build_command": [
      "cargo",
      "near",
      "build"
    ],
    "build_environment": "dj8yfo/sourcescan:0.x.x-dev-git-pull-179-ccache-cut-single@sha256:b46ea2c26ef5762c0675aa3563bd38aa045366c27a9918867a2455c83c8b046a",
    "contract_path": "product-donation",
    "source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=1695790693f1058a70d4edc54144a94570e199bd"
  },
  "link": "https://github.com/dj8yfo/factory-rust/tree/1695790693f1058a70d4edc54144a94570e199bd",
  "standards": [
    {
      "standard": "nep330",
      "version": "1.2.0"
    }
  ],
  "version": "0.2.9"
}
```
  
</p></details>

- [x] product
[Cargo.toml](https://github.com/dj8yfo/factory-rust/blob/1695790693f1058a70d4edc54144a94570e199bd/product-donation/Cargo.toml#L5-L21)
=> repro-fct-product-35.testnet

<details>
  <summary>repro-fct-product-35.testnet</summary><p>
  
```json
{
  "build_info": {
    "build_command": [
      "cargo",
      "near",
      "build"
    ],
    "build_environment": "dj8yfo/sourcescan:0.x.x-dev-git-pull-179-ccache-cut-single@sha256:b46ea2c26ef5762c0675aa3563bd38aa045366c27a9918867a2455c83c8b046a",
    "contract_path": "product-donation",
    "source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=1695790693f1058a70d4edc54144a94570e199bd"
  },
  "link": "https://github.com/dj8yfo/factory-rust/tree/1695790693f1058a70d4edc54144a94570e199bd",
  "standards": [
    {
      "standard": "nep330",
      "version": "1.2.0"
    }
  ],
  "version": "0.2.9"
}
```


</p></details>

---------

Co-authored-by: dj8yf0μl <noreply@nowhere.org>
…abi) (#181)

addresses
[bug](#179 (comment))
Host with CLI built from [cargo-near
branch](https://github.com/dj8yfo/cargo-near/tree/artificially_bumped_version):

![image](https://github.com/user-attachments/assets/bd3956d2-f8b3-43e9-b4c0-dd74f5bd241f)




From
[docker](https://github.com/dj8yfo/cargo-near-image/blob/0.13.0-fake-dev-cargo-near-git/Dockerfile#L36)
from [cargo-near
branch](https://github.com/dj8yfo/cargo-near/tree/artificially_bumped_version):

![image](https://github.com/user-attachments/assets/b0fcec72-9e7f-43d8-8f58-49fc7e8ff51c)

--- 

```bash
near contract call-function as-read-only donation-product.repro-fct-37.testnet contract_source_metadata json-args {} network-config testnet now
```

=> 

<details>
  <summary>donation-product.repro-fct-37.testnet</summary><p>
  
```json
{
  "build_info": {
    "build_command": [
      "cargo",
      "near",
      "build"
    ],
    "build_environment": "dj8yfo/sourcescan:0.x.x-dev-git-artif-0.13.0@sha256:bf0945f898cb141786df5e8ebfbaeefdd9f9c7afedabf3a1109b9d06743ca4bc",
    "contract_path": "product-donation",
    "source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=0bc030fb4e3340f998b48e34f97823c3958c8cf7"
  },
  "link": "https://github.com/dj8yfo/factory-rust/tree/0bc030fb4e3340f998b48e34f97823c3958c8cf7",
  "standards": [
    {
      "standard": "nep330",
      "version": "1.2.0"
    }
  ],
  "version": "0.2.9"
}
```

</p></details>

--- 

```bash
near contract download-abi donation-product.repro-fct-37.testnet save-to-file donation-product.repro-fct-37.testnet.json network-config testnet now
```
=> 

```json
{
  "schema_version": "0.4.0",
  "metadata": {
    "name": "donation",
    "version": "0.2.9",
    "build": {
      "compiler": "rustc 1.79.0",
      "builder": "cargo-near 0.13.0"
    }
  },
  "body": {
  ...
```

--- 

```bash
sha256sum *.wasm
8d3b755c02f8b8341581af03b84c9608e59c557153d9fc64a3ba3c1b4c19a34e  donation-product.repro-fct-37.testnet.wasm
3a1c58f6d9fc0e3b0c987cd5e01fbf5c63627ade4babfd74fdf4ac7a566ab253  repro-fct-37.testnet.wasm
8d3b755c02f8b8341581af03b84c9608e59c557153d9fc64a3ba3c1b4c19a34e  repro-fct-product-37.testnet.wasm
```

---------

Co-authored-by: dj8yf0μl <noreply@nowhere.org>
…ontainers' slate clean (#187)

this helps one to avoid situation like the following

```bash
> docker ps -a
CONTAINER ID   IMAGE          COMMAND     CREATED         STATUS                     PORTS     NAMES
beebc6fabd59   hello-world    "/hello"    2 minutes ago   Exited (0) 2 minutes ago             thirsty_khayyam
b59f3a296253   hello-world    "/hello"    2 minutes ago   Exited (0) 2 minutes ago             nostalgic_proskuriakova
bf65bdf66e2d   hello-world    "/hello"    2 minutes ago   Exited (0) 2 minutes ago             elastic_raman
df77872a4e83   hello-world    "/hello"    2 minutes ago   Exited (0) 2 minutes ago             condescending_lovelace
7b5c5d675f4d   hello-world    "/hello"    4 hours ago     Exited (0) 4 hours ago               clever_davinci
baa7ed21d5a3   hello-world    "/hello"    4 hours ago     Exited (0) 4 hours ago               competent_noether
5f3f8b4ef47f   hello-world    "/hello"    6 hours ago     Exited (0) 6 hours ago               quirky_robinson
b3af2f69f0ce   hello-world    "/hello"    6 hours ago     Exited (0) 6 hours ago               peaceful_montalcini
7474b6b9a63e   hello-world    "/hello"    6 hours ago     Exited (0) 6 hours ago               gifted_ishizaka
8c1649c953bc   hello-world    "/hello"    7 hours ago     Exited (0) 7 hours ago               charming_curie
7671ebcf8b03   hello-world    "/hello"    7 hours ago     Exited (0) 7 hours ago               laughing_feynman
6bd65c95a1dc   hello-world    "/hello"    7 hours ago     Exited (0) 7 hours ago               blissful_williamson
35bc610101f1   hello-world    "/hello"    9 hours ago     Exited (0) 9 hours ago               sweet_turing
dcf9ff8002c2   hello-world    "/hello"    9 hours ago     Exited (0) 9 hours ago               tender_swartz
22938edbffa6   hello-world    "/hello"    9 hours ago     Exited (0) 9 hours ago               competent_goldstine
bb516160ad89   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                cranky_agnesi
133fe7e8ac35   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                clever_tu
ca2a73d83730   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                musing_matsumoto
4d2c07333f9a   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                intelligent_goodall
fb487ec0bd7d   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                admiring_pasteur
c6aa19bf78ec   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                vigilant_kalam
053027d416c1   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                epic_cray
4d54480f729c   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                peaceful_hertz
3a85cc2defc1   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                jovial_volhard
4d5ed4cb065a   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                determined_swirles
0d242e9e4e0f   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                dazzling_leakey
5025e729ed24   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                dazzling_bell
4b33b8e96cf6   hello-world    "/hello"    2 days ago      Exited (0) 2 days ago                festive_carson
4007c7ddb5b1   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                intelligent_johnson
208c6d6c3740   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                nifty_nightingale
462aa5bcec78   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                funny_heyrovsky
b65f7f4cec2a   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                musing_ganguly
225c621e7e79   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                objective_feynman
373b6e3c2364   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                stupefied_babbage
a419d742019a   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                priceless_euler
572a17618bfa   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                infallible_golick
05a5ffbff01f   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                condescending_roentgen
21ea755e137f   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                sharp_ishizaka
ffab88a8994c   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                gallant_archimedes
444255a624c4   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                suspicious_aryabhata
731ccc251f90   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                clever_pasteur
a0e7f67c0a58   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                boring_maxwell
06c2962c9259   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                sleepy_faraday
219061a4243c   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                hungry_hopper
0d75ae75281a   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                mystifying_meitner
902373262fcd   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                relaxed_morse
a62276ea2e89   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                vigilant_beaver
dd2bdbd600ec   hello-world    "/hello"    6 days ago      Exited (0) 6 days ago                charming_benz
d68930274c6f   bab5e95c6a09   "/bin/sh"   9 days ago      Exited (0) 9 days ago                suspicious_banzai
d7db5deb2d5d   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                intelligent_torvalds
dffbaa95d563   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                reverent_hellman
0d79b8720dc2   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                admiring_morse
a04d69f5fa79   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                naughty_mclean
198f30a8e732   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                xenodochial_pascal
488151c187ed   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                musing_poitras
4454fdcc3600   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                upbeat_ardinghelli
03ee5588b30d   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                exciting_darwin
b8557213f74a   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                great_aryabhata
675769ea7b7c   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                wonderful_hopper
e176ddf9e03a   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                hungry_hugle
a56b30bf58c5   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                sleepy_brown
413bdca80e6c   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                thirsty_brahmagupta
8995a9ed4762   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                confident_archimedes
e9b6dd3f98d9   hello-world    "/hello"    9 days ago      Exited (0) 9 days ago                vigorous_bassi
0b8c84b95e30   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               clever_hermann
9d4485f16efa   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               sleepy_feistel
d359d1121992   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               pensive_lichterman
85fe0b3fc427   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               hardcore_lichterman
d8f2a662b10a   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               pedantic_robinson
1ebe283d7350   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               upbeat_visvesvaraya
c3ebdc1eb21b   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               nostalgic_germain
fadaba548378   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               relaxed_carver
859b9e2c23d4   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               tender_germain
a66dd58e2c40   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               crazy_golick
108397933ba9   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               vibrant_hypatia
7695d90b4e55   hello-world    "/hello"    10 days ago     Exited (0) 10 days ago               happy_pare

```

Co-authored-by: dj8yf0μl <noreply@nowhere.org>
@frol frol marked this pull request as ready for review July 23, 2024 07:22
@dj8yfo
Copy link
Collaborator

dj8yfo commented Jul 26, 2024

being tested in https://github.com/dj8yfo/relatorio

@dj8yfo dj8yfo merged commit e3c8adb into main Jul 30, 2024
14 checks passed
@dj8yfo dj8yfo deleted the source-scan-integration branch July 30, 2024 10:23
@frol frol mentioned this pull request Jul 30, 2024
@race-of-sloths
Copy link

✅ PR is finalized!

Your contribution is much appreciated with a final score of 13!
You have received 150 (130 base + 20 weekly bonus) Sloth points for this contribution

Another weekly streak completed, well done @FroVolod! To keep your weekly streak and get another bonus make pull request next week! Looking forward to see you in race-of-sloths

frol added a commit that referenced this pull request Aug 6, 2024
## 🤖 New release
* `cargo-near`: 0.6.4 -> 0.7.0

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.7.0](cargo-near-v0.6.4...cargo-near-v0.7.0)
- 2024-08-06

### Added
- Added ability to use SourceScan
([#134](#134))

### Fixed
- Replacing atty unmaintained dependency
([#194](#194))

### Other
- update default docker images tags + digests
([#191](#191))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
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.

SourceScan integration
5 participants