Skip to content

Commit

Permalink
test: issue gnolang#1067 (Bug: contract execution fee is added on top…
Browse files Browse the repository at this point in the history
… of the transaction fee.)
  • Loading branch information
r3v4s committed Nov 25, 2024
1 parent c6f8dd4 commit 64b31ce
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions gno.land/cmd/gnoland/testdata/gas_1067.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## start a new node
gnoland start

## check test1 balance
gnokey query bank/balances/${USER_ADDR_test1}
stdout 'height: 0'
stdout 'data: "10000000000000ugnot"'

## add contract
gnokey maketx addpkg -pkgdir $WORK -pkgpath gno.land/r/demo/echo -gas-fee 2ugnot -gas-wanted 3000000 -broadcast -chainid=tendermint_test test1
stdout OK!

## check balance after addpkg
gnokey query bank/balances/${USER_ADDR_test1}
stdout 'height: 0'
stdout 'data: "9999999999998ugnot"'

## call contract
gnokey maketx call -pkgpath gno.land/r/demo/echo -func Echo -args echoooo -gas-fee 5ugnot -gas-wanted 6000000 -broadcast -chainid=tendermint_test test1
stdout OK!
stdout '\"echoooo\" string'

## check balance after call
gnokey query bank/balances/${USER_ADDR_test1}
stdout 'height: 0'
stdout 'data: "9999999999993ugnot"'

-- gno.mod --
module gno.land/r/demo/echo

-- echo.gno --
package echo

func Echo(msg string) string {
return msg
}

0 comments on commit 64b31ce

Please sign in to comment.