Closed dj8yfo closed 3 months ago
Based on contracts deployed from sdk pr: https://github.com/near/near-sdk-rs/pull/1178 :
near contract call-function as-read-only sample-crate.testnet contract_source_metadata json-args {} network-config testnet now
=>
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"--no-release",
"--no-doc"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-cargo-near-build-cmd-repo@sha256:e6b0ba022673c5845df842173b005426573c9583f78cd8a1782462e59807e05a",
"contract_path": "",
"source_code_snapshot": "git+https://github.com/dj8yfo/sample_no_workspace.git?rev=6c5ae44150ce51349a95e1605ba053c4fe53cf28"
},
"link": "https://github.com/dj8yfo/sample_no_workspace/tree/6c5ae44150ce51349a95e1605ba053c4fe53cf28",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.7.7"
}
near contract call-function as-read-only sample-subpath-in-repo.testnet contract_source_metadata json-args {} network-config testnet now
=>
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"--no-release",
"--no-doc"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-cargo-near-build-cmd-repo@sha256:e6b0ba022673c5845df842173b005426573c9583f78cd8a1782462e59807e05a",
"contract_path": "self-updates/update",
"source_code_snapshot": "git+https://github.com/dj8yfo/sample_workspace.git?rev=b2d5580037c84fd4038b467564a9be9e520611de"
},
"link": "https://github.com/dj8yfo/sample_workspace/tree/b2d5580037c84fd4038b467564a9be9e520611de",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "1.7.7"
}
near contract call-function as-read-only sample-crate-in-submodule.testnet contract_source_metadata json-args {} network-config testnet now
=>
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"--no-release",
"--no-doc"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-cargo-near-build-cmd-repo@sha256:e6b0ba022673c5845df842173b005426573c9583f78cd8a1782462e59807e05a",
"contract_path": "self-updates/update",
"source_code_snapshot": "git+https://github.com/dj8yfo/sample_workspace_with_submodules.git?rev=3d87c81517e1e23a5716c300fe4789b1aafc4c6f"
},
"link": "https://github.com/dj8yfo/sample_workspace_with_submodules/tree/3d87c81517e1e23a5716c300fe4789b1aafc4c6f",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "1.0.0"
}
near contract call-function as-read-only bitbucket-scratch.testnet contract_source_metadata json-args {} network-config testnet now
=>
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"--no-release",
"--no-doc"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-cargo-near-build-cmd-repo@sha256:e6b0ba022673c5845df842173b005426573c9583f78cd8a1782462e59807e05a",
"contract_path": "",
"source_code_snapshot": "git+https://feepdake27@bitbucket.org/dj8yfomule/scratch_check_git.git?rev=219ac475a016eedae17d5f8600cec1b77d64a918"
},
"link": "https://bitbucket.org/dj8yfomule/scratch_check_git/src/master/",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.1.0"
}
Summary of changes:
git dirty
check copied tocargo near build
flow, it produces a warning, unlike the error incargo near deploy
flowsource_code_git_url
field to reproducible build metadatagit pushed to remote
check logic reworkedHEAD
is determinedCARGO_NEAR_SOURCE_CODE_SNAPSHOT
(adapted from cargo::core::SourceId) andCARGO_NEAR_CONTRACT_PATH
are exported into container