Skip to content

Conversation

@PsychoPunkSage
Copy link

What this PR does / why we need it:
This PR is meant to introduce a new example (using FPC & cc-tools) called confidential escrow.

Which issue(s) this PR fixes:

NIL

Special notes for your reviewer:
TBA

Description: "UUID of the Digital Asset to read",
DataType: "string",
Required: true,
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of receiving the uuid section of the @key of the asset you could receive directly a reference to the asset. The argument could be:

		{
			Tag:         "digitalAsset",
			Label:       "Digital Asset",
			Description: "Digital Asset to read",
			DataType:    "->digitalAsset",
			Required:    true,
		},

This allows you to call the transaction with two options of body:

{
    "@assetType": "digitalAsset",
    "@key": "digitalAsset:[UUID]",
}

Or

{
    "@assetType": "digitalAsset",
    "symbol": "[TokenSymbol]",
}

This would the "CC-Tools" way of doing it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the argument would "arrive" in the transaction routine already validated by CC-Tools.

uuid, _ := req["uuid"].(string)
key := assets.Key{
"@key": "digitalAsset:" + uuid,
}
Copy link

@samuelvenzi samuelvenzi Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you do this, you are bypassing CC-Tools key formation, which is fine if you know that the UUID is correct.

In conjunction to my comment above, you wouldn't need to do this because the req map would have already a assets.Key type with the validated key (no matter which argument you used: @key or key properties).

return nil, errors.WrapError(err, "Failed to update asset")
}

_, err = updatedAsset.Put(stub)
Copy link

@samuelvenzi samuelvenzi Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC-Tools provides an UpdateAsset function that could be used here. The update function receives a map with only the fields you'd like to update. No need to reassemble the full asset with fields that are not being updated. I'd suggest replacing this Put with the Update.

@mbrandenburger mbrandenburger added the comp/samples This issue is related to our FPC samples label Sep 25, 2025
munapower and others added 26 commits October 10, 2025 16:33
Signed-off-by: munapower <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Marcus Brandenburger <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
By adding the sample chaincode to the tools as dep prevents unwanted
cleanup, e.g., by dependabot

Signed-off-by: Marcus Brandenburger <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
This adds single key-Value store abstraction layer to protected against rollback attacks.

Signed-off-by: chenchanglew <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
- add all go modules
- group dependencies

Signed-off-by: Marcus Brandenburger <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
- run go mod tidy
- add fpc replace directive

Signed-off-by: Marcus Brandenburger <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
a simple tool to tidy go modules and update deps

Signed-off-by: Marcus Brandenburger <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Marcus Brandenburger <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Marcus Brandenburger <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Bumps gopkg.in/ini.v1 from 1.66.2 to 1.67.0.

---
updated-dependencies:
- dependency-name: gopkg.in/ini.v1
  dependency-version: 1.67.0
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Improve simple-testing-network to check if monitoring should be enabled or not.

Fix docker tag issues and add note to readme

Small fix to minikube readme and CA image

Signed-off-by: munapower <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/samples This issue is related to our FPC samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants