Proof of concept implementation for "Data sharing in the metaverse with key abuse resistance based on decentralized CP-ABE"
-
Golang
https://go.dev/dl/ -
Solidity
https://docs.soliditylang.org/en/v0.8.2/installing-solidity.html Version: 0.8.20 -
Solidity compiler (solc)
https://docs.soliditylang.org/en/latest/installing-solidity.html
Version: 0.8.25-develop -
Ganache-cli
https://www.npmjs.com/package/ganache-cli -
Abigen
Version: v1.14.3go get -u github.com/ethereum/go-ethereum go install github.com/ethereum/go-ethereum/cmd/abigen@v1.14.3
-
main.go
run this file to test the functionalities of the framework. -
compile/contract/
The folder stores contract source code file (.sol) and generated go contract file. -
compile/compile.sh
The script file compiles solidity and generates go contract file. -
genPrvKey.sh
The script file generates accounts and stores in the.env
file.
-
Generate private keys to generate the
.env
filebash genPrvKey.sh
-
start ganache
ganache --mnemonic "basics" -l 90071992547 -e 1000
-
Compile the smart contract code
bash compile.sh
-
Run the main.go
go run main.go