This file provides practical guidance for working in the Nibiru repository.
Nibiru Chain is an L1 blockchain with parallel VM support:
- Nibiru EVM for Ethereum-compatible execution
- Wasm VM for CosmWasm smart contracts
Important Directories:
app/- Application wiring and integrationcmd/nibid/- Node binary entrypoints and localnet scriptsevm/- EVM module, EVM state, ante flow, precompiles, E2E, and Forge workspaceeth/- Ethereum RPC/account/encoding helpersgosdk/- Go SDK client packagelib/cosmos-sdk/- Nibiru's in-tree Cosmos SDK packageslib/ibc-go/- Nibiru's in-tree IBC packagesproto/- Protobuf definitionsx/- Custom Cosmos SDK modules
Prefer just commands at the repository root.
just install # build + install nibid
just build # build nibid without install
just localnet # start a local chainjust test-fast # go test with cache
just test # go test -count=1 (requires localnet)
just test-cover # go test with coverage (requires localnet)
just test-e2e # EVM E2E test suite in evm/e2e/
go test ./evm/... # target one package treeFunctions in *_test.go files whose names begin with Example are executable
documentation. The name after Example must identify the exported package
symbol being documented:
Example() // package
ExampleFunction() // exported function or type
ExampleType_Method() // exported method
Example_suffix() // package-level example with a lowercase suffixAn // Output: block makes the example's standard output an assertion. Use a
lowercase suffix when an example demonstrates several APIs and does not
document one specific exported symbol.
just tidy # go mod tidy + proto gen + lint + fmt
just proto gen
just lint # golangci-lint
just fmt # gofumpt- Go version: follow
go.mod - Node.js and npm: required for
evm/e2e/ - Docker: required for containerized workflows (for example, some lint/chaosnet flows)
- Install or update dependencies with command
just install. - Run a local chain with command
just localnetwhen tests require live chain state. - Make code changes in the relevant package directories.
- Run relevant tests (
go test ./<pkg>/..., commandjust test-fast, and/or commandjust test-e2e). - Run command
just tidybefore opening a PR.
- E2E tests live in directory
evm/e2e/and are run via commandjust test-e2e. - Solidity embed artifacts are generated with command
just gen-embeds. - Foundry workspace is in directory
evm/forge/.
- RPC:
http://localhost:26657 - gRPC:
localhost:9090 - EVM RPC:
http://localhost:8545 - API:
http://localhost:1317
- Main docs: https://nibiru.fi/docs/
- TypeScript SDK: https://www.npmjs.com/package/@nibiruchain/ts-sdk
- Solidity package: file
evm/embeds/README.md - EVM package: file
evm/README.md
- Discord: https://discord.gg/nibirufi
- X (Twitter): https://twitter.com/NibiruChain
- Telegram: https://t.me/nibiruchainofficial