Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 976 Bytes

README.md

File metadata and controls

35 lines (25 loc) · 976 Bytes

store

The store package is an internal dependency of texa, used to store the CID hashes of the result data from the interrogation session into the ethereum blockchain.

Usage

  1. Update the smart contract TexaResultStorage.sol, as needed. Now, install solcjs using the command:
$ sudo npm -g install solc
  1. Generate the ABI and bytecode
$ solcjs --abi TexaResultStorage.sol
$ solcjs --bin TexaResultStorage.sol

This will generate 2 files in the PWD.

  1. Install abigen and generate the store.go file using the abigen command

First, let us install the abigen:

$ go get -u github.com/ethereum/go-ethereum
$ cd $GOPATH/src/github.com/ethereum/go-ethereum/
$ make
$ make devtools

Now, let us use the abigen command to generate the store.go file:

$ abigen --bin=TexaResultStorage_sol_TexaResultStorage.bin --abi=TexaResultStorage_sol_TexaResultStorage.abi --pkg=store --out=store.go