forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: issue gnolang#1067 (Bug: contract execution fee is added on top…
… of the transaction fee.)
- Loading branch information
Showing
1 changed file
with
36 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,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 | ||
} |