Steamm publocal is a CLI tool designed to automate the deployment of the Steamm Move package and all its dependencies—including Suilend, Pyth, Switchboard, Wormhole, and more—on a Sui localnet environment.
- Move Package Publishing: Publishes each Move package to localnet.
- Package Test-code injection: It allows code modules to be injected into the steamm and suilend package deployment
- Sourcing of
test_onlyfunctions: For ease of testing, this pipeline allows for test_only functions to be made public, which often allows for more efficient mocking of on-chain state - Automated Cleanup & Setup: Cleans up previous deployments and prepares the environment for a fresh start.
- Dependency Management: Clones the latest Steamm contracts and extracts all required dependencies (liquid_staking, suilend, pyth, switchboard, wormhole, etc.), organizing them into local directories.
- Object ID Extraction: Automatically fetches and records important object IDs (registries, admin caps, coin metadata, treasury caps, etc.) created during deployment.
- Environment Handling: Ensures the Sui CLI is set to localnet and restores the previous environment after deployment. Test Preparation: Exports the active Sui private key to a .env file for use in local testing
First, fresh start your localnet:
just fstart - this will reset localnet state everytime, to use persisted state just start
Second, publish all source code to localnet:
just pub
This will:
- Deploy all packages defined in templates/*.Move.toml
- Will inject
setupcode into Steamm ansuilend_setupcode into Suilend - Sources the following
test-onlyfunctions from the contracts:- pyth::price_info::new_price_info_object_for_setup
- pyth::price_info::update_price_info_object_for_testing
- steamm_scripts::events::emit_event
- Deploys the test tokens tokens described in:
template/setup/b_sui.movetemplate/setup/b_usdc.movetemplate/setup/lp_usdc_sui.movetemplate/setup/sui.movetemplate/setup/usdc.move
- Sets up a lending market with the following reserves:
SUI(test token)USDC(test token)
- Sets up
B_SUI/B_USDCsteamm pool and relevant objects - Populates
packages.tswith relevant object IDs, types and packages
To cleanup the packages.ts you can run just unpub