Skip to content

Commit

Permalink
test: txtar testing to compare gas used between simulate only and skip
Browse files Browse the repository at this point in the history
  • Loading branch information
r3v4s committed Nov 27, 2024
1 parent 61ccf72 commit ad14e18
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions gno.land/cmd/gnoland/testdata/simulate_gas.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# load the package
loadpkg gno.land/r/simulate $WORK/simulate

# start a new node
gnoland start

# simulate only
gnokey maketx call -pkgpath gno.land/r/simulate -func Hello -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test -simulate only test1
stdout 'GAS USED: 50299'

# simulate skip
gnokey maketx call -pkgpath gno.land/r/simulate -func Hello -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid=tendermint_test -simulate skip test1
stdout 'GAS USED: 50299' # same as simulate only


-- package/package.gno --
package call_package

func Render() string {
return "notok"
}

-- simulate/simulate.gno --
package simulate

func Hello() string {
return "Hello"
}

0 comments on commit ad14e18

Please sign in to comment.