Commit 23025bbe authored by Zsolt from VM's avatar Zsolt from VM

fixed a small issue with the add item contract

parent 72e45cb6
......@@ -7,7 +7,7 @@ export abstract class BasicContract extends Contract {
}
protected async query<T>(ctx: Context, whatis: string, id: string): Promise<T> {
const k = BasicContract.mkKey(whatis, id);
let k = BasicContract.mkKey(whatis,id);
return this.queryByFullKey(ctx, k);
}
......@@ -21,10 +21,9 @@ export abstract class BasicContract extends Contract {
return JSON.parse(valAsBytes.toString());
}
protected async queryFullRange(ctx: Context, whatis: string): Promise<string> {
protected async queryFullRange(ctx: Context, whatis: string): Promise<string> {
const startKey = BasicContract.mkKey(whatis,'0');
const endKey = BasicContract.mkKey(whatis,'999');
const iterator = await ctx.stub.getStateByRange(startKey, endKey);
const allResults = [];
......@@ -56,8 +55,9 @@ export abstract class BasicContract extends Contract {
}
protected async create<T>(ctx: Context, whatis: string, id: string, val: T) {
let key = BasicContract.mkKey(whatis, id);
await ctx.stub.putState(
BasicContract.mkKey(whatis, id),
key,
Buffer.from(JSON.stringify(val))
);
}
......
......@@ -108,7 +108,7 @@ export class SupplyChain extends BasicContract {
public async addItemInfo(ctx: Context, id: string, ii:string)
{
await this.create(ctx, 'iteminfo', id, JSON.parse(ii));
await this.create(ctx, 'iteminfo', id, ii);
}
// the id of the evaluation is the item id it refers to
......
......@@ -27,7 +27,7 @@
"peer0.org1.example.com": {
"url": "grpcs://localhost:7051",
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICVzCCAf2gAwIBAgIQVlmmYs1AFcaE6AUp0Squ7TAKBggqhkjOPQQDAjB2MQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz\nY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMDAxMjkxNTUzMDBaFw0zMDAxMjYxNTUz\nMDBaMHYxCzA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D\nAQcDQgAEdQj53UPbpTS6FOZk/iq0HsDQFPTtbo0q6Q8Xc++SOr6R50Bwv//um1lW\nc/mA+5HtlVyV1+5/zG15KyTYPO+vWKNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1Ud\nJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1Ud\nDgQiBCDfYAhkel6QQD/kP7WigDPepe82c2xOD8m7QqF+nwvtWTAKBggqhkjOPQQD\nAgNIADBFAiEA2q264J63X3i0nQDtW/YiIUJ4vNRcafZtBx+oLQZaVkgCIH/GCKBy\n6e2P00NrudffHt/tT0ctYYOn0Y+H2zjPJbso\n-----END CERTIFICATE-----\n"
},
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com",
......@@ -37,7 +37,7 @@
"peer1.org1.example.com": {
"url": "grpcs://localhost:8051",
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICVzCCAf2gAwIBAgIQVlmmYs1AFcaE6AUp0Squ7TAKBggqhkjOPQQDAjB2MQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz\nY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0yMDAxMjkxNTUzMDBaFw0zMDAxMjYxNTUz\nMDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH\nEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD\nVQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEcQRuBouCiDR76GXxMZEeCP7Jr7ETs0JA+ZJU1OQQcHxWauz65IhhMC/n\n6C2NiJEfaIFgaEPQp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iEA2q264J63X3i0nQDtW/YiIUJ4vNRcafZtBx+oLQZaVkgCIH/GCKBy\n6e2P00NrudffHt/tT0ctYYOn0Y+H2zjPJbso\n-----END CERTIFICATE-----\n"
},
"grpcOptions": {
"ssl-target-name-override": "peer1.org1.example.com",
......@@ -50,7 +50,7 @@
"url": "https://localhost:7054",
"caName": "ca-org1",
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICUDCCAfegAwIBAgIQaoMHAWvj38IXcbYavY2DcDAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0yMDAxMjkxNTUzMDBaFw0zMDAxMjYxNTUzMDBa\nMHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD\nExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\nQ8+CXqVTlei+mR3Y2Vda/gVUvV+2x63UWLfPzp2HlSCc5HUY0zpAuoj6aKJEG6QO\nLo6jzeKaXAmKjTMRXUqbSqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQG\nCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCCu\nM9gNt7l+vG7owiLjzKBW3u/15/Igtb5aiv3HPUyyiDAKBggqhkjOPQQDAgNHADBE\nAiB0NWtHNsj67lOW1CgL+yaE5axD7jJGdi2DnS1Hos3vQAIgR4bQW2L4i4VFEp0M\n3we3tfSXUxU5Xt95kRNTSbSlvK0=\n-----END CERTIFICATE-----\n"
"pem": "-----BEGIN CERTIFICATE-----\nMIICUDCCAfegAwIBAgIQUGOKMELLlI836dFbSXRvETAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0yMDA5MDIxNDQxMDBaFw0zMDA4MzExNDQxMDBa\nMHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD\nExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\ni04epxeZSguW/6dNPTbxrg9S3TyzsCDBj5teJoTH7WXE3C5XhBM+6mdDgC0RPS3c\ndO+5+r0WUwdDuwz0piNQLKNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQG\nCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCCn\nY3AsJsB0JVqO2xcL6goHZdrCIbsMcnvlTB5NTmadLjAKBggqhkjOPQQDAgNHADBE\nAiB/N2orwpRYKt5ZWdY5bVxB4enV8I6Z8ZklH+CAk/k8LgIgXk0/skN/7CUSf0OU\nvmKi/50OktssrETQx6hKMzPRjsQ=\n-----END CERTIFICATE-----\n"
},
"httpOptions": {
"verify": false
......
......@@ -21,19 +21,19 @@ peers:
tlsCACerts:
pem: |
-----BEGIN CERTIFICATE-----
MIICVzCCAf2gAwIBAgIQVlmmYs1AFcaE6AUp0Squ7TAKBggqhkjOPQQDAjB2MQsw
MIICVzCCAf2gAwIBAgIQPA+onObCuOCcanj+SxZ7jzAKBggqhk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JEG6QO
Lo6jzeKaXAmKjTMRXUqbSqNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQG
CCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCCu
M9gNt7l+vG7owiLjzKBW3u/15/Igtb5aiv3HPUyyiDAKBggqhkjOPQQDAgNHADBE
AiB0NWtHNsj67lOW1CgL+yaE5axD7jJGdi2DnS1Hos3vQAIgR4bQW2L4i4VFEp0M
3we3tfSXUxU5Xt95kRNTSbSlvK0=
i04epxeZSguW/6dNPTbxrg9S3TyzsCDBj5teJoTH7WXE3C5XhBM+6mdDgC0RPS3c
dO+5+r0WUwdDuwz0piNQLKNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQG
CCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCCn
Y3AsJsB0JVqO2xcL6goHZdrCIbsMcnvlTB5NTmadLjAKBggqhkjOPQQDAgNHADBE
AiB/N2orwpRYKt5ZWdY5bVxB4enV8I6Z8ZklH+CAk/k8LgIgXk0/skN/7CUSf0OU
vmKi/50OktssrETQx6hKMzPRjsQ=
-----END CERTIFICATE-----
httpOptions:
......
......@@ -27,7 +27,7 @@
"peer0.org2.example.com": {
"url": "grpcs://localhost:9051",
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICVzCCAf6gAwIBAgIRALqxFwIDvgbv0b2p0P3iMqgwCgYIKoZIzj0EAwIwdjEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs\nc2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMjAwMTI5MTU1MzAwWhcNMzAwMTI2MTU1\nMzAwWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMK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xr4DhpaSKpserm/lkFg2/hyiy3UpZ1YSpxYuw41G0U\nm6CzCh9a1VLyE4MukzIyccDRwIKVUnijbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNV\nHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNV\nHQ4EIgQgi6X8KRT96FV29z/5h/feH27JFzKDqLgK+mNxuZpd3XwwCgYIKoZIzj0E\nAwIDSAAwRQIhAOQQ4zwS1x6pMMbfpQmF52nmkZgwvRI+lAJI7vSN+ZYZAiBvkkdA\n+FSqC96kiDekHlnqJi87fiVZFj6xvNd/kG9SFw==\n-----END CERTIFICATE-----\n"
},
"grpcOptions": {
"ssl-target-name-override": "peer0.org2.example.com",
......@@ -37,7 +37,7 @@
"peer1.org2.example.com": {
"url": "grpcs://localhost:10051",
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICVzCCAf6gAwIBAgIRALqxFwIDvgbv0b2p0P3iMqgwCgYIKoZIzj0EAwIwdjEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs\nc2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMjAwMTI5MTU1MzAwWhcNMzAwMTI2MTU1\nMzAwWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE\nBxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G\nA1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABM3+oAwPpCU7vdCXl2oPUvj/e1kX5eZYrPZSAX4ukA58aPNqoup3VgVt\nEn/yMs+xJuUK3yvffukGD8X0+s5ou/6jbTBrMA4GA1U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MMbfpQmF52nmkZgwvRI+lAJI7vSN+ZYZAiBvkkdA\n+FSqC96kiDekHlnqJi87fiVZFj6xvNd/kG9SFw==\n-----END CERTIFICATE-----\n"
},
"grpcOptions": {
"ssl-target-name-override": "peer1.org2.example.com",
......@@ -50,7 +50,7 @@
"url": "https://localhost:8054",
"caName": "ca-org2",
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICUTCCAfigAwIBAgIRALj1qIec2bV3PAk3pfdyLTowCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzIuZXhhbXBsZS5jb20wHhcNMjAwMTI5MTU1MzAwWhcNMzAwMTI2MTU1MzAw\nWjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UE\nAxMTY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBMAoBmUGHxMIJyWDmYwhP3dWZCCoXkBJDzlWEon4EJClqbRVHKgj63gmJSbXYV4S\nLU6ruNImEqrczHTBwL9L9pWjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU\nBggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg\nGOThbgeIXOi8Cp/douuVA6iET/etC/PWK9UkcMm90QIwCgYIKoZIzj0EAwIDRwAw\nRAIgCHxA0eJcQ/8WmYGi9CkIRZW1YVn7B0f7xj99ulUuhBICIGwrPeWWP874M+g9\n8GgRKe/FVwDU5s4hTcYOkGbB3EZS\n-----END CERTIFICATE-----\n"
"pem": "-----BEGIN CERTIFICATE-----\nMIICUTCCAfigAwIBAgIRAODnI3pTehzxYTHoqhMbmyowCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzIuZXhhbXBsZS5jb20wHhcNMjAwOTAyMTQ0MTAwWhcNMzAwODMxMTQ0MTAw\nWjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UE\nAxMTY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBFr1yyT3ZqTXiVZD9Wz/h21x8CIEetGMhSmUwkPR6Ia+751cX156Eb2Oje9pcXhX\nZyxJI0dam14cLAG85fd3SpyjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU\nBggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg\nDeG18rylym1Z2oL8VVUGiUzK4AA6EgCymyRuYn1LwE0wCgYIKoZIzj0EAwIDRwAw\nRAIgPqVK3MROeDQJIUnacIS7E436WguePqXMg/+LhTdrssUCIF1/7Sekra2NaNjl\nd1wV2Lcei/R5WvNeINMADQUgx1Pk\n-----END CERTIFICATE-----\n"
},
"httpOptions": {
"verify": false
......
......@@ -21,19 +21,19 @@ peers:
tlsCACerts:
pem: |
-----BEGIN CERTIFICATE-----
MIICVzCCAf6gAwIBAgIRALqxFwIDvgbv0b2p0P3iMqgwCgYIKoZIzj0EAwIwdjEL
MIICWDCCAf6gAwIBAgIRAOZw/uszhHqxtZ1s2C/iQzYwCgYIKoZIzj0EAwIwdjEL
MAk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1UE
AxMTY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA
BMAoBmUGHxMIJyWDmYwhP3dWZCCoXkBJDzlWEon4EJClqbRVHKgj63gmJSbXYV4S
LU6ruNImEqrczHTBwL9L9pWjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU
BFr1yyT3ZqTXiVZD9Wz/h21x8CIEetGMhSmUwkPR6Ia+751cX156Eb2Oje9pcXhX
ZyxJI0dam14cLAG85fd3SpyjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU
BggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg
GOThbgeIXOi8Cp/douuVA6iET/etC/PWK9UkcMm90QIwCgYIKoZIzj0EAwIDRwAw
RAIgCHxA0eJcQ/8WmYGi9CkIRZW1YVn7B0f7xj99ulUuhBICIGwrPeWWP874M+g9
8GgRKe/FVwDU5s4hTcYOkGbB3EZS
DeG18rylym1Z2oL8VVUGiUzK4AA6EgCymyRuYn1LwE0wCgYIKoZIzj0EAwIDRwAw
RAIgPqVK3MROeDQJIUnacIS7E436WguePqXMg/+LhTdrssUCIF1/7Sekra2NaNjl
d1wV2Lcei/R5WvNeINMADQUgx1Pk
-----END CERTIFICATE-----
httpOptions:
......
......@@ -139,8 +139,8 @@ async function dispatchCmd(args, contract):Promise<string>
};
const info_str = JSON.stringify(info as chaincode.ItemInfo);
await contract.submitTransaction(
'addSimple',
"iteminfo" + args["idx"].toString(),
'addItemInfo',
args["idx"].toString(),
info_str );
return JSON.stringify(`Successfully added info #${args["idx"]}!`); }
default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment