bin/gas-report
This commit is contained in:
19
bin/gas-report
Executable file
19
bin/gas-report
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
report() {
|
||||||
|
REPORT=$(forge test --mc GasTest --mt "$1" --gas-report)
|
||||||
|
SWAP=$(echo "$REPORT" | grep 'swap ' | cut -d '|' -f 5 | xargs)
|
||||||
|
MINT=$(echo "$REPORT" | grep 'mint ' | cut -d '|' -f 5 | xargs)
|
||||||
|
SWAPMINT=$(echo "$REPORT" | grep 'swapMint ' | cut -d '|' -f 5 | xargs)
|
||||||
|
printf "%-10s %10s %10s %10s\n" "$1" "$SWAP" "$MINT" "$SWAPMINT"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Print header
|
||||||
|
printf "%-10s %10s %10s %10s\n" "" "swap" "mint" "swapMint"
|
||||||
|
printf "%s\n" " ------ --------- ---------"
|
||||||
|
|
||||||
|
report GasPair
|
||||||
|
report StablePair
|
||||||
|
report Ten
|
||||||
|
report Twenty
|
||||||
|
report Fifty
|
||||||
@@ -9,7 +9,8 @@ remappings = [
|
|||||||
optimizer=true
|
optimizer=true
|
||||||
optimizer_runs=100000000 # maximum value allowed by etherscan's verifier XD. The max value is formally 2^32-1
|
optimizer_runs=100000000 # maximum value allowed by etherscan's verifier XD. The max value is formally 2^32-1
|
||||||
viaIR=true
|
viaIR=true
|
||||||
gas_reports = ['PartyPool', 'PartyPoolBalancedPair', 'PartyPlanner', 'PartyPoolSwapImpl', 'PartyPoolMintImpl',]
|
#gas_reports = ['PartyPool', 'PartyPoolBalancedPair', 'PartyPlanner', 'PartyPoolSwapImpl', 'PartyPoolMintImpl',]
|
||||||
|
gas_reports = ['PartyPool', 'PartyPoolBalancedPair', 'PartyPlanner']
|
||||||
fs_permissions = [{ access = "write", path = "liqp-deployments.json"}]
|
fs_permissions = [{ access = "write", path = "liqp-deployments.json"}]
|
||||||
|
|
||||||
[lint]
|
[lint]
|
||||||
|
|||||||
Reference in New Issue
Block a user