Skip to content

Instantly share code, notes, and snippets.

View mtnieto's full-sized avatar
🏠
Working from home

María Teresa Nieto mtnieto

🏠
Working from home
View GitHub Profile
function replacePrivateKey () {
echo # Replace key
#Si trabajas con macOSx descomenta todas las lineas siguientes, si no dejalo como esta.
# ARCH=`uname -s | grep Darwin`
# if [ "$ARCH" == "Darwin" ]; then
# OPTS="-it"
# else
"start")
#generateCerts
#generateChannelArtifacts
replacePrivateKey
#pullDockerImages
#startNetwork
case $COMMAND in
"start")
generateCerts
generateChannelArtifacts
replacePrivateKey
pullDockerImages
startNetwork
OrdererOrgs:
- Name: Orderer
Domain: myapp.com
CA:
Country: US
Province: California
Locality: San Francisco
Specs:
Organizations:
- &OrdererOrg
Name: OrdererOrg
ID: OrdererMSP
MSPDir: crypto-config/ordererOrganizations/myapp.com/msp
Policies:
version: 2.0.0
#
# The client section used by GO SDK.
#
client:
# Which organization does this application instance belong to? The value must be the name of an org
# defined under "organizations"
organization: org1
/*
* SPDX-License-Identifier: Apache-2.0
*/
'use strict';
const FabricCAServices = require('fabric-ca-client');
const { FileSystemWallet, X509WalletMixin, Gateway } = require('fabric-network');
const fs = require('fs');
const Client = require('fabric-client')
{
"version": "1.0.0",
"client": {
"organization": "org1",
"logging": {
"level": "debug"
},
"peer": {
"timeout": {
"connection": "15s",
pragma solidity >=0.4.22 <0.6.0;
contract Greeter {
/* Define variable greeting of the type string */
string greeting;
/* This runs when the contract is executed */
constructor(string memory _greeting) public {
/* Token ERC20 - Smart Contract */
pragma solidity ^0.5.2;
import "github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol";
import "github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol";
contract Token is IERC20 {
using SafeMath for uint256;