-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: txtar testing to compare gas used between simulate only and skip
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |