2022-03-16 13:26:48 +00:00
|
|
|
set -e
|
2021-11-22 09:02:28 +00:00
|
|
|
# shellcheck shell=bash
|
2022-06-01 15:22:39 +00:00
|
|
|
|
|
|
|
# examples that we can't run because they require some additional infra, docker or ledger for example
|
|
|
|
ignored=(
|
|
|
|
"moonbeam_with_abi"
|
|
|
|
"ipc"
|
|
|
|
"ledger"
|
|
|
|
"paginated_logs"
|
|
|
|
"subscribe_logs"
|
|
|
|
"trezor"
|
|
|
|
"yubi"
|
2022-11-09 16:09:03 +00:00
|
|
|
"remove_liquidity"
|
2022-06-01 15:22:39 +00:00
|
|
|
)
|
|
|
|
|
2021-08-30 11:00:30 +00:00
|
|
|
# run all examples
|
|
|
|
for file in examples/*.rs; do
|
2021-11-22 09:02:28 +00:00
|
|
|
name="$(echo "$file" | cut -f 1 -d '.')"
|
2022-06-01 15:22:39 +00:00
|
|
|
if [[ "${ignored[*]}" =~ $(basename "$name") ]]; then
|
|
|
|
echo "skipping: $file"
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
echo "running: $file"
|
2022-11-09 16:09:03 +00:00
|
|
|
cargo r -p ethers --example "$(basename "$name")" --features "ethers-solc rustls ws"
|
2021-08-30 11:00:30 +00:00
|
|
|
done
|