Blockchain CTF with bounty on steriod 💪
Change directory to host
cd hostSetup environment, change the value to your desired value.
cp .env.example .env vim .envEdit environment and input transactions sequence.
vim src/main.rs// Modify this line to change the secret //let mut secret = totally_not_a_backdoor()?; //secret.submitter = submitter; //secret panic!("Please provide a txs path");Run binary to generate proof. The proof and parameters that is required to claim the bounty will be printed out in stdout.
cargo run --release # Image ID: ... # Submitter: ... # Txs Hash: ... # Env Hash: ... # Seal bytes: ... # Post state digest: ...Please recheck the Image Id and compare it with contract's PRE_STATE_DIGEST (Or in UI's claim page). If it's different, please rerun with cargo run --release -- --IMAGE_ID={PRE_STATE_DIGEST}
Or optionally, run the binary with --txs-path and --env-path to load the transactions and environment from a file instead. See sanity.txs.json and sanity.env.json for example.
cargo run --release -- --txs-path sanity.txs.json --env-path sanity.env.jsonChange directory to frontend
cd frontendSetup environment, change the value to your desired value.
cp .env.example .env vim .envInstall dependencies and run locally.
yarn && yarn dev