Skip to main content

Posts

Non-Fungible Tokens | NFT

 Non-Fungible Token or NFT - are unique, digital items with blockchain-managed ownership. Examples include collectibles, game items, digital art, event tickets, domain names, and even ownership records for physical assets. Non-fungible assets are just normal stuff. Fungible assets are the odd ones out! NFTs are tokens that we can use to represent ownership of unique items. They let us tokenise things like art, collectibles, even real estate. They can only have one official owner at a time and they're secured by the Ethereum blockchain – no one can modify the record of ownership or copy/paste a new NFT into existence. Following are the best reads and resources for the same: Perfect guide Good comparison
Recent posts

Hyperledger Architecture: White Papers

Hyperledger Architecture Working Group(WG) has published the white papers which provides introduction to Hyperledger Business Blockchain Design Philosophy and Consensus. A Volume II of these white papers talks primarily about Smart Contracts. Hyperledger Architecture: Volume I Hyperledger Architecture: Volume II

Hyperledger Fabric! Error: failed to create deliver client for orderer

While creating channel faced following error: Error: failed to create deliver client for orderer: orderer client failed to connect to orderer.openhut.in:7050: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer.openhut.in on 127.0.0.11:53: no such host" Solution: $./byfn.sh down $docker volume prune $sudo systemctl daemon-reload $sudo systemctl restart docker $cd <path of download>/fabric-samples/first-network $./byfn.sh generate $./byfn.sh up

Development Hyperledger Fabric Network Setup and Writing Chaincode

Steps to setup Hyperledger Fabric for development Start docker container(s) Validate all the containers are running Fabric services are running All containers should be running for at least 2 minutes Create a new channel Join peers to the channel Update achor peers on the channel created Automating setup Using a bash script to automate the process It makes it easier and faster Writing Chaincode Write Chaincode in Dev Mode Make sure TLS is disabled Example: FABRIC_CA_SERVER_TLS_ENABLED=false Installing chaincode on the peers to make them endorsing peers Instantiate chaincode on the channel This will create a new docker container Test the chaincode written above

Hyperledger Fabric: Developer Mode

- Disble TLS..TLS_ENABLED = false Installing on every peer and instantiating chaincode:  - Takes about a minutes for lets say 6-7 peers - This is not so practical - Sol: - Use DEV MODE that is chaincode runs on the user( like browser accessing the chaincode ) - peer-chaincodedev=true - A chaincode is one or multiple smart contract https://fabric-shim.github.io/release-1.4/index.html

Layout of Solidity Source File

A solidity source file can contain: contract definitions import directives pragma directives Pragmas: used to enable certain compiler features or checks each file should have a pragma while importing a file into another file, pragma does not automatically apply Versioning: The version of pragma is used as follows: pragma solidity ^0.5.2; A source file with the line above does not compile with a compiler earlier than version 0.5.2, and it also does not work on a compiler starting from version 0.6.0 (this second condition is added by using ^). This is because there will be no breaking changes until version 0.6.0, so you can always be sure that your code compiles the way you intended.  Importing Other Source Files In solidity, import is used to create modular structure of the project similar to JavaScript(ES6) but doesn't support the concept of default export. import "filename"; The above mentioned format is not supported as it poll...

Ethereum Accounts

In Ethereum, the state is made up of objects called 'accounts'. An account having: 20 byte address state transitions being direct transfers of value and information between accounts An ethereum account contains four fields: nonce - counter used to make sure each transaction can be processed once ether balance - account's current balance contract code(optional) - account's contact code storage(default - empty) - account's storage Ether , is the main crypto-fuel of Ethereum and is used to pay transaction fees. Generally, there are two types of accounts: Externally Owned Accounts(EOA) controlled by private keys has no code by creating and signing a transaction, one can send messages has following information available to them: Total number of Ethers for the account Functionalities to send and receive transaction Private and Public Keys to manage the account. Contract Accounts(CA) controlled by their contract code every time the ac...