-
Notifications
You must be signed in to change notification settings - Fork 98
chore::> confidential escrow example - LFX25 #836
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
base: main
Are you sure you want to change the base?
Conversation
| Description: "UUID of the Digital Asset to read", | ||
| DataType: "string", | ||
| Required: true, | ||
| }, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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, | ||
| } |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
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]>
…s files Signed-off-by: Abhinav Prakash <[email protected]>
…example 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]>
…Asset Signed-off-by: Abhinav Prakash <[email protected]>
…ogic Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
…working 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]>
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