This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.6; | |
import "ds-test/test.sol"; | |
import "./Emarket.sol"; | |
contract EmarketTest is DSTest { | |
Emarket emarket; | |
function setUp() public { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.6; | |
import "ds-token/token.sol"; | |
contract Emarketwithcoin { | |
struct Item { | |
string description; | |
address seller; | |
address buyer; | |
uint price; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
networks: | |
byfn: | |
services: | |
orderer.example.com: | |
container_name: orderer.example.com | |
image: hyperledger/fabric-orderer | |
environment: | |
- ORDERER_GENERAL_LOGLEVEL=debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var app = express(); | |
app.use(bodyParser.json()); | |
// Setting for Hyperledger Fabric | |
const { FileSystemWallet, Gateway } = require('fabric-network'); | |
const path = require('path'); | |
const ccpPath = path.resolve(__dirname, '.', 'connection-org1.json'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "first-network-org1", | |
"version": "1.0.0", | |
"client": { | |
"organization": "Org1", | |
"connection": { | |
"timeout": { | |
"peer": { | |
"endorser": "300" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SPDX-License-Identifier: Apache-2.0 | |
*/ | |
'use strict'; | |
const { FileSystemWallet, Gateway, X509WalletMixin } = require('fabric-network'); | |
const path = require('path'); | |
const ccpPath = path.resolve(__dirname, '..', '..', 'first-network', 'connection-org1.json'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SPDX-License-Identifier: Apache-2.0 | |
*/ | |
'use strict'; | |
const FabricCAServices = require('fabric-ca-client'); | |
const { FileSystemWallet, X509WalletMixin } = require('fabric-network'); | |
const fs = require('fs'); | |
const path = require('path'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OrdererOrgs: | |
- Name: Orderer | |
Domain: example.com | |
Specs: | |
- Hostname: orderer | |
PeerOrgs: | |
- Name: Org1 | |
Domain: org1.example.com | |
Template: | |
Count: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
Organizations: | |
- &OrdererOrg | |
Name: OrdererOrg | |
ID: OrdererMSP | |
MSPDir: ./crypto-config/ordererOrganizations/example.com/msp | |
- &Org1 | |
Name: Org1MSP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
orderer: | |
image: hyperledger/fabric-orderer | |
environment: | |
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=deployment_fabric | |
- ORDERER_HOME=/var/hyperledger/orderer | |
- ORDERER_GENERAL_LOGLEVEL=debug |