It takes input of Ethereum smart contract in Solidity Language and converts it to the equivalent Hyperledger Fabric Chaincode in Javascript Language
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
BalanceChainCode
Input
Output
.DS_Store
LICENSE
README.md
Translated Contract Details.png
index.js
package.json

README.md

SolidityToJavascriptTranslatorCode

It takes input of Ethereum smart contract in Solidity Language and converts it to the equivalent Hyperledger Fabric Chaincode in Javascript Language

For Run the Tool

Make sure you have already installed node on your computer.

Step 1:

Download the whole repository

or

Get the code throw git command git clone https://github.com/AhmadZafarITU/SolidityToJavascriptTranslatorCode

Step 2:

Open command prompt navigate to the project location and run following two commands

i. npm install ii. node index.js

Step 3:

It will take input solidity code repository like Input/Example#1 Then it will take solidity file name like SimpleStorage.sol

Step 4:

Your output will be generated in SolidityToJavascriptTranslatorCode/Output folder with contract name file. Like if your contract name is test the output file will be test.js

Info

It is still in development phase only 65-70% have been completed.

I have successfully completed following examples.

  1. Storage (https://solidity.readthedocs.io/en/v0.4.24/introduction-to-smart-contracts.html)
  2. EnumExample (https://solidity.readthedocs.io/en/v0.4.24/types.html#enums)
  3. CrowdFunding (https://solidity.readthedocs.io/en/v0.4.24/types.html#structs)
  4. ProofOfExistence3 (https://github.com/sindelio/smart_contracts/blob/master/smart_contract_samples/ProofOfExistence.sol)
  5. Coin (https://solidity.readthedocs.io/en/v0.4.24/introduction-to-smart-contracts.html)
  6. Voting (https://solidity.readthedocs.io/en/v0.4.24/solidity-by-example.html)
  7. Simple Open Auction (https://solidity.readthedocs.io/en/v0.4.24/solidity-by-example.html)
  8. bank (https://github.com/James-Sangalli/learn-solidity-with-examples/blob/master/Finance/bank.sol)
  9. Blind Auction (https://solidity.readthedocs.io/en/v0.4.24/solidity-by-example.html)
  10. Safe Remote Purchase (https://solidity.readthedocs.io/en/v0.4.24/solidity-by-example.html)
  11. Abstract Contracts (https://solidity.readthedocs.io/en/v0.4.21/contracts.html#abstract-contracts)
  12. Contract Creating Other contract (https://solidity.readthedocs.io/en/v0.4.24/contracts.html#visibility-and-getters)
  13. Claimable (https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Claimable.sol)
  14. SimpleSavingsWallet (https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/examples/SimpleSavingsWallet.sol)
  15. EIP20 Token (https://github.com/ConsenSys/Tokens/tree/master/contracts/eip20)

Important Note

For run the chaincode first you have to install balance.js chaincode with the name balance on fabric network. It is for handling account and contract balances.

balance chaincode path : BalanceChainCode/balance.js