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.
- Update the smart contract
TexaResultStorage.sol
, as needed. Now, install solcjs using the command:
$ sudo npm -g install solc
- Generate the ABI and bytecode
$ solcjs --abi TexaResultStorage.sol
$ solcjs --bin TexaResultStorage.sol
This will generate 2 files in the PWD.
- 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