Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e): 1. Generated smart contract types for ethers. 2. TypeScript support. 3. Formatter #1917

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/e2e-evm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
"**go.mod",
"**go.sum",
"contrib/docker/*",
"**.ts",
"**.js",
"**.json",
]
Expand Down Expand Up @@ -66,17 +67,17 @@ jobs:
with:
node-version: 18

- name: NPM Install
run: npm install
- name: "just install"
run: just install
working-directory: "e2e/evm"

- name: "Launch localnet"
run: |
just localnet --no-build &
sleep 6

- name: Run tests
run: npm test
- name: "Run tests (just test)"
run: just test
working-directory: "e2e/evm"
env:
JSON_RPC_ENDPOINT: http://127.0.0.1:8545
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ ui-debug.log
/public/
.env
firebase-debug.log
**/bun.lockb
out-*
exit-status-*
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1909](https://github.com/NibiruChain/nibiru/pull/1909) - chore(evm): set is_london true by default and removed from config
- [#1911](https://github.com/NibiruChain/nibiru/pull/1911) - chore(evm): simplified config by removing old eth forks
- [#1914](https://github.com/NibiruChain/nibiru/pull/1914) - refactor(evm): Remove dead code and document non-EVM ante handler
- [#1917](https://github.com/NibiruChain/nibiru/pull/1917) - test(e2e-evm): TypeScript support. Type generation from compiled contracts. Formatter for TS code.

#### Dapp modules: perp, spot, oracle, etc

Expand Down
1 change: 1 addition & 0 deletions e2e/evm/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
Binary file added e2e/evm/bun.lockb
Binary file not shown.
36 changes: 36 additions & 0 deletions e2e/evm/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Use this justfile by
# (1) installing with "cargo install just"
# (2) running the "just" command.

# Displays available recipes by running `just -l`.
setup:
#!/usr/bin/env bash
just -l


# Install all dependencies
install:
#!/usr/bin/env bash

# Check if the given binary is in the $PATH.
the_cmd="bun"
if which "$the_cmd" >/dev/null 2>&1; then
echo "✅ bun is installed."
else
log_error "$the_cmd is not present in \$PATH"
npm install -g [email protected]
fi

bun install

# Generate types from compiled contracts
gen-types:
bun run typechain --target=ethers-v6 contracts/*Compiled.json

# Runs the E2E tests
test:
bun test

# Format
fmt:
bun run prettier --write "test/**/*.ts"
Loading
Loading