thorgen
is a command line tool that generates Go smart contract wrappers for VeChainThor blockchain. This CLI tool has been copied from go-ethereum and modified to work with VeChainThor blockchain.
thorgen
provides typed contract wrappers to:
- Query contract state
- Create transaction clauses
- Execute single clause transactions
- Query on chain events
go install github.com/darrenvechain/thorgo/cmd/thorgen
Prints the command usage and options.
thorgen help
thorgen \
--abi https://raw.githubusercontent.com/vechain/b32/refs/heads/master/ABIs/VeBetterDAO-b3tr.json \
--pkg main \
--out b3tr-erc20.go \
--type B3tr
Generates a Go smart contract wrapper for the given contract address.
thorgen \
--abi /path/to/your/contract.abi \
--bin /path/to/your/contract.bin \
--pkg main \
--out your-contract-wrapper.go \
--type YourContract
Generates a Go smart contract wrapper for the given hardhat artifact.
thorgen \
--artifact /path/to/your/artifact.json \
--pkg main \
--out your-contract-wrapper.go \
--type YourContract