This application provide API for AuraScan, an explorer site belongs to Aura Network ecosystem, to verify if a smart contract source code truely belongs to a contract deployed on Network.
This project is built following the flow of verifying a smart contract of CosmWasm documentation.
/cloud
: Create connection to MySQL Database, S3 service and initialize redis client/docs
: Contains swagger documents/model
: Contains smart contract entity, request model, config, etc./repository
: Contains services to query data from and update data to DB/script
: Contains shell script file to process verification step/service
: Contains functions to query data onchain through CLI commands/util
: Contains common functions
You can set up Golang following the official documentation. This application require go version v1.17+.
The standard approach is to use rustup to maintain dependencies and handle updating multiple versions of cargo(v1.55.0+) and rustc, which you will be using.
After install rustup tool make sure you have the wasm32 target:
rustup target list --installed
rustup target add wasm32-unknown-unknown
Install cargo-generate and cargo-run-script. If not installed, please run the command below:
cargo install cargo-generate --features vendored-openssl
cargo install cargo-run-script
cd $repo
go mod download
go build
cd $repo
go run main.go