forked from runtimeverification/wasm-semantics
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 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,34 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
ROOT_DIR="$SCRIPT_DIR/../../.." | ||
|
||
# change to root directory | ||
cd "$ROOT_DIR" | ||
|
||
# re-execute script with poetry to get poetry script aliases | ||
if [ -z ${IN_POETRY_SHELL:+x} ]; then | ||
export IN_POETRY_SHELL=1 | ||
exec poetry -C pykwasm run bash "$SCRIPT_DIR/$0" | ||
fi | ||
|
||
# generate some accounts | ||
a1=$(mkacct) | ||
a2=$(mkacct) | ||
a3=$(mkacct) | ||
|
||
# fund accounts | ||
fund /dev/stdin <<< $a1 | ||
fund /dev/stdin <<< $a2 | ||
fund /dev/stdin <<< $a3 | ||
|
||
# deploy contract | ||
contract=$(deploy build/erc20/erc20.bin http://localhost:8545 /dev/stdin <<< $a1) | ||
|
||
# check decimals | ||
decimals=$(call http://localhost:8545 erc20 $contract /dev/stdin 0 decimals <<< $a1) | ||
|
||
# check total supply | ||
supply=$(call http://localhost:8545 erc20 $contract /dev/stdin 0 totalSupply <<< $a1) | ||
|
||
|