Skip to content

Commit

Permalink
test contract
Browse files Browse the repository at this point in the history
  • Loading branch information
zxlwdgithub committed Apr 1, 2020
1 parent d95c9c8 commit 81a0c1a
Show file tree
Hide file tree
Showing 19 changed files with 521 additions and 1,091 deletions.
504 changes: 504 additions & 0 deletions contracts/example/go/fabsample/fabsample.go

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions contracts/outchain/callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ func SignTransaction(chaincodeID string, chainName string, params []byte) (strin
//
priKey, err := GetJuryKeyInfo(chaincodeID, chainName, params, adaptorObj)
if err != nil {
return "", err
if "fabric" == chainName {
priKey = []byte{}
} else {
return "", err
}
}
//
var input adaptor.SignTransactionInput
Expand Down Expand Up @@ -149,7 +153,11 @@ func SignMessage(chaincodeID string, chainName string, params []byte) (string, e
//
priKey, err := GetJuryKeyInfo(chaincodeID, chainName, params, adaptorObj)
if err != nil {
return "", err
if "fabric" == chainName {
priKey = []byte{}
} else {
return "", err
}
}
//fmt.Printf("prikey : %x\n", priKey)
//
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ require (
github.com/palletone/btc-adaptor v1.0.1-0.20191224041536-3348ea137f6e
github.com/palletone/digital-identity v0.6.1-0.20190729063546-3dca665105bb
github.com/palletone/eth-adaptor v1.1.1-0.20200114040401-8226d1a11f3f
github.com/palletone/fabric-adaptor v0.0.0-20200327133758-e7f247ade38e
github.com/palletone/fabric-adaptor v0.0.0-20200331153353-6319b6f26aa4
github.com/pborman/uuid v1.2.0
github.com/peterh/liner v0.0.0-20170902204657-a37ad3984311
github.com/pkg/errors v0.8.1
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,8 @@ github.com/palletone/digital-identity v0.6.1-0.20190729063546-3dca665105bb/go.mo
github.com/palletone/eth-adaptor v1.1.0/go.mod h1:g9jTKBCiofy0AmP5rmuCZGm91Z8sTTnjzyBg8oPcas0=
github.com/palletone/eth-adaptor v1.1.1-0.20200114040401-8226d1a11f3f h1:gR0Wb+HsPqR5efdo/tLfln4WrnhXiwtADAfv3ObMS6k=
github.com/palletone/eth-adaptor v1.1.1-0.20200114040401-8226d1a11f3f/go.mod h1:i7Eq3JTzzDJTMuLBUKDw2w6WgU4DI1YHtRohFkeAQK0=
github.com/palletone/fabric-adaptor v0.0.0-20200326145905-1bc66935ad67 h1:6Ntna6mC6lrF1VbTDD/VRVEBbucjM2U/2/JPdNUahgY=
github.com/palletone/fabric-adaptor v0.0.0-20200326145905-1bc66935ad67/go.mod h1:T69hXyDMLq0AD4AJwYroxnUzstQ5WS1dn9pc15caZb8=
github.com/palletone/fabric-adaptor v0.0.0-20200327133758-e7f247ade38e h1:ppSisJLobGFKNVoDs8UlLcOB9ibf0rh2O6l7mz4Y/Lk=
github.com/palletone/fabric-adaptor v0.0.0-20200327133758-e7f247ade38e/go.mod h1:T69hXyDMLq0AD4AJwYroxnUzstQ5WS1dn9pc15caZb8=
github.com/palletone/fabric-adaptor v0.0.0-20200331153353-6319b6f26aa4 h1:HAr0hP3TbCEQnlK1WaPNFZCAO4PhPuCrBrbXik+/2U4=
github.com/palletone/fabric-adaptor v0.0.0-20200331153353-6319b6f26aa4/go.mod h1:JAeFd9y2FIEEHd2v7nu+w2S8FB9JW/YisDVkU+hATEI=
github.com/palletone/go-palletone v1.0.4/go.mod h1:kkJ40TJ3ii7ZqP+Hc3Mwneb5MUK3hgDu7fWIIupoIkU=
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
Expand Down
9 changes: 0 additions & 9 deletions vendor/github.com/naoina/go-stringutil/.travis.yml

This file was deleted.

19 changes: 0 additions & 19 deletions vendor/github.com/naoina/go-stringutil/LICENSE

This file was deleted.

13 changes: 0 additions & 13 deletions vendor/github.com/naoina/go-stringutil/README.md

This file was deleted.

253 changes: 0 additions & 253 deletions vendor/github.com/naoina/go-stringutil/da.go

This file was deleted.

Loading

0 comments on commit 81a0c1a

Please sign in to comment.