Skip to content

Commit

Permalink
test(e2e): 1. Generated smart contract types for ethers. 2. TypeScrip…
Browse files Browse the repository at this point in the history
…t support. 3. Formatter (#1917)

* Squashed commit of the following:

commit 021d161d176112cf24e28780ad64f61155f70ea2
Author: Unique-Divine <[email protected]>
Date:   Fri Jun 7 22:00:10 2024 -0500

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

commit af7e7b3
Author: Unique-Divine <[email protected]>
Date:   Fri Jun 7 16:11:45 2024 -0500

    chore: another issue ticket

commit 36745fd
Author: Unique-Divine <[email protected]>
Date:   Fri Jun 7 16:07:20 2024 -0500

    chore: add issue number for TODO comment

commit 8a76c0e
Author: Unique-Divine <[email protected]>
Date:   Fri Jun 7 15:54:07 2024 -0500

    refactor(evm): Remove dead code and document non-EVM ante handler

commit e4e11df
Author: Unique-Divine <[email protected]>
Date:   Fri Jun 7 15:52:38 2024 -0500

    refactor: remove dead code

commit cad00c0
Merge: dc5f4dd 359e310
Author: Unique-Divine <[email protected]>
Date:   Fri Jun 7 15:41:53 2024 -0500

    Merge branch 'main' into ud/ante-test

commit dc5f4dd
Author: Unique-Divine <[email protected]>
Date:   Fri Jun 7 15:28:53 2024 -0500

    refactor: ante handler and evm cleanup

commit f73cdc3
Merge: d3a6ea9 290c372
Author: Unique-Divine <[email protected]>
Date:   Wed Jun 5 20:59:39 2024 -0500

    Merge branch 'test/evm-grpc-query' of https://github.com/NibiruChain/nibiru into test/evm-grpc-query

commit d3a6ea9
Merge: 376596d 70ee1bf
Author: Unique-Divine <[email protected]>
Date:   Wed Jun 5 20:59:30 2024 -0500

    Merge branch 'main' into test/evm-grpc-query

commit 376596d
Author: Unique-Divine <[email protected]>
Date:   Wed Jun 5 20:58:40 2024 -0500

    Squashed commit of the following:

    commit b5687130ff5f3d020a3b14d219fec3a816579c30
    Author: Unique-Divine <[email protected]>
    Date:   Wed Jun 5 20:57:44 2024 -0500

        chore: run tidy

    commit 1f1f938
    Merge: 3e3cc83 bbcc6f8
    Author: Unique-Divine <[email protected]>
    Date:   Wed Jun 5 19:16:30 2024 -0500

        Merge branch 'main' into ud/fix-race-condition

    commit 3e3cc83
    Author: Unique-Divine <[email protected]>
    Date:   Wed Jun 5 19:15:40 2024 -0500

        chore: changelog

    commit 3876ccb
    Author: Unique-Divine <[email protected]>
    Date:   Wed Jun 5 19:04:00 2024 -0500

        refactor: more consistent test names

    commit aaa0a19
    Author: Unique-Divine <[email protected]>
    Date:   Wed Jun 5 18:53:09 2024 -0500

        test(oracle): Fix missing tear down step for oracle integration test

    commit 8c3c35e
    Author: Unique-Divine <[email protected]>
    Date:   Wed Jun 5 17:55:56 2024 -0500

        chore: add test comands to justfile

    commit 4916282
    Merge: 64ed0a2 e7e708d
    Author: Unique-Divine <[email protected]>
    Date:   Fri May 31 09:35:33 2024 -0500

        Merge branch 'main' into ud/fix-race-condition

    commit 64ed0a2
    Author: Unique-Divine <[email protected]>
    Date:   Fri May 31 01:44:55 2024 -0500

        fix(gosdk): tests parallel race condition

commit 290c372
Merge: 0d1c894 70ee1bf
Author: Unique Divine <[email protected]>
Date:   Wed Jun 5 20:05:19 2024 -0500

    Merge branch 'main' into test/evm-grpc-query

commit 0d1c894
Merge: 9170835 ad173e9
Author: Unique Divine <[email protected]>
Date:   Wed Jun 5 19:34:38 2024 -0500

    Merge branch 'main' into test/evm-grpc-query

commit 9170835
Author: Oleg Nikonychev <[email protected]>
Date:   Wed Jun 5 13:55:14 2024 +0400

    fix: removed hardcoded gas value in grpc_query test

commit 4337858
Author: Oleg Nikonychev <[email protected]>
Date:   Wed Jun 5 13:14:34 2024 +0400

    chore: refactored eth util methods

commit 7df84e2
Merge: 8918498 bbcc6f8
Author: Oleg Nikonychev <[email protected]>
Date:   Wed Jun 5 12:23:51 2024 +0400

    chore: resolve conflicts

commit 8918498
Merge: 3fd45ce e7e708d
Author: Oleg Nikonychev <[email protected]>
Date:   Mon Jun 3 21:56:39 2024 +0400

    Merge branch 'main' into test/evm-grpc-query

commit 3fd45ce
Author: Oleg Nikonychev <[email protected]>
Date:   Mon Jun 3 21:56:23 2024 +0400

    chore: changelog update

commit 3348876
Author: Oleg Nikonychev <[email protected]>
Date:   Mon Jun 3 21:53:54 2024 +0400

    test(evm): grpc_query full coverage

* test(e2e-evm): more type safety
  • Loading branch information
Unique-Divine authored Jun 10, 2024
1 parent f88a395 commit 42a8b65
Show file tree
Hide file tree
Showing 31 changed files with 1,664 additions and 3,952 deletions.
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 bun@1.1.12
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

0 comments on commit 42a8b65

Please sign in to comment.