Simple command line utility for fetching cost models & comparing fees
cargo build --release
Executable is placed in ./target/release/cost-models
Examples use QmeBPZyEeaHyZAiFS2Q7cT3CESS49hhgGuT3E9S8RYoHNm.
-
Fetch cost models
cost-models fetch \ --deployment QmeBPZyEeaHyZAiFS2Q7cT3CESS49hhgGuT3E9S8RYoHNm \ --network-subgraph https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum \ | tee cost-models-QmeBPZyEeaHyZAiFS2Q7cT3CESS49hhgGuT3E9S8RYoHNm.json
-
Execute cost models
cost-models fees \ --cost-models "$(cat cost-models-QmeBPZyEeaHyZAiFS2Q7cT3CESS49hhgGuT3E9S8RYoHNm.json)" \ --query '{ _meta { block { number } } }'
output as CSV:
cost-models fees \ --cost-models "$(cat cost-models-QmeBPZyEeaHyZAiFS2Q7cT3CESS49hhgGuT3E9S8RYoHNm.json)" \ --query '{ _meta { block { number } } }' \ | jq -r 'to_entries | .[] | [.key, .value] | @csv'