Skip to content

Instantly share code, notes, and snippets.

View MXmaster2s's full-sized avatar
💭
Everything Blockchain!!

Rohit MXmaster2s

💭
Everything Blockchain!!
View GitHub Profile
@MXmaster2s
MXmaster2s / gist:0157e3c4de58b28eb25a0e946f803ab7
Created August 24, 2020 19:06
Error while installing Vagrant: check last few lines
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libfprint-2-tod1 libwebcam0 uvcdynctrl uvcdynctrl-data
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
attr augeas-lenses btrfs-progs cpu-checker cryptsetup-bin db-util db5.3-util debootstrap dmeventd exfat-fuse exfat-utils extlinux f2fs-tools finalrd fonts-lato hfsplus ibverbs-providers
ipxe-qemu ipxe-qemu-256k-compat-efi-roms keyutils kpartx ldmtool libafflib0v5 libaio1 libarchive-tools libaugeas0 libcacard0 libconfig9 libdate-manip-perl libdevmapper-event1.02.1 libewf2
libf2fs-format4 libf2fs5 libfdt1 libguestfs-hfsplus libguestfs-perl libguestfs-reiserfs libguestfs-tools libguestfs-xfs libguestfs0 libhfsp0 libhivex0 libibverbs1 libintl-perl
@MXmaster2s
MXmaster2s / Allowance.sol
Last active August 15, 2020 17:23
SharedWaller.sol allows the contract-creator to set allowance limit to any address. The users can withdraw money from the wallet based on the set allowance. Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.1+commit.e6f7d5a4…
pragma solidity ^0.6.1;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol";
contract Allowance is Ownable {
using SafeMath for uint256;
event AllowanceChanged(address indexed _forWho, address indexed _fromWho, uint256 _oldAmount, uint256 _newAmount);
[ 1.430589] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.430799] fuse init (API version 7.26)
[ 1.434141] Key type asymmetric registered
[ 1.434142] Asymmetric key parser 'x509' registered
[ 1.434186] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 1.434253] io scheduler noop registered
[ 1.434254] io scheduler deadline registered
[ 1.434292] io scheduler cfq registered (default)
[ 1.435033] pcieport 0000:00:1c.0: AER enabled with IRQ 122
[ 1.435054] pcieport 0000:00:1c.0: Signaling PME with IRQ 122
@MXmaster2s
MXmaster2s / 3_getStudent.js
Last active June 15, 2020 10:22
ERROR while initiating the getStudent on client application: Unexpected end og JSON input
'use strict';
/**
* This is a Node.JS application to fetch a Student Account from network
* Defaults:
* StudentID: 0001
*/
const helper = require('./contractHelper');
rohit@rohit-Swift-SF514-52T:~/workspace/certification-network/network$ ./fabricNetwork.sh install
Installing chaincode for channel 'certificationchannel' with CLI timeout of '15' seconds and CLI delay of '5' seconds and chaincode version '1.1'
Continue? [Y/n] y
proceeding ...
LOCAL_VERSION=1.4.3
DOCKER_IMAGE_VERSION=1.4.7
=================== WARNING ===================
Local fabric binaries and docker images are
rohit@rohit-Swift-SF514-52T:~/workspace$ curl -sSL https://bit.ly/2ysbOFE | bash -s -- 1.4.3 1.4.3 0.4.18
Clone hyperledger/fabric-samples repo
===> Cloning hyperledger/fabric-samples repo and checkout v1.4.3
Cloning into 'fabric-samples'...
remote: Enumerating objects: 43, done.
remote: Counting objects: 100% (43/43), done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 5385 (delta 18), reused 16 (delta 8), pack-reused 5342
rohit@rohit-Swift-SF514-52T:~/workspace/fabric-samples$ cd first-network
rohit@rohit-Swift-SF514-52T:~/workspace/fabric-samples/first-network$ ./byfn.sh up
Starting for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
LOCAL_VERSION=1.4.3
DOCKER_IMAGE_VERSION=2.1.0
=================== WARNING ===================
Local fabric binaries and docker images are
out of sync. This may cause problems.
@MXmaster2s
MXmaster2s / Certification Network Output for (fabricNetwork.sh generate)
Last active June 6, 2020 13:19
fabricNetwork.sh generate gives this error and I cannot delete the crypto-config files because the half-baked files are now permissioned to root user :/
Generating certs and genesis block for channel 'certificationchannel' with CLI timeout of '15' seconds and CLI delay of '5' seconds and chaincode version '1.1'
Continue? [Y/n] y
proceeding ...
/home/rohit/workspace/certification-network/network/bin/cryptogen
##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
rm: cannot remove 'crypto-config/ordererOrganizations/certification-network.com/orderers/orderer.certification-network.com/msp/keystore': Permission denied
rm: cannot remove 'crypto-config/ordererOrganizations/certification-network.com/orderers/orderer.certification-network.com/tls': Permission denied