Deploy a Solidity contract
The reference node uses a pinned Osaka EVM profile. Its contract fixtures pin solc 0.8.37. Match compiler/EVM settings and verify that your installed Foundry supports them.
For an existing application, first review Porting from other EVM chains, especially shared JOLT balances, router assumptions and native account policy.
Create a local project
With a running devnet and Foundry:
forge init --no-git joltzu-counter
cd joltzu-counter
Set the project's foundry.toml:
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
solc_version = "0.8.37"
evm_version = "osaka"
optimizer = true
optimizer_runs = 200
Replace src/Counter.sol with:
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.37;
contract Counter {
uint256 public number;
event NumberChanged(uint256 number);
function setNumber(uint256 next) external {
number = next;
emit NumberChanged(next);
}
function increment() external {
number += 1;
emit NumberChanged(number);
}
}
The conventional setNumber and increment methods also fit Foundry's scaffolded Counter tests.
Compile and deploy
forge build
export ETH_RPC_URL=http://127.0.0.1:30400
export JOLTZU_DEV_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
forge create src/Counter.sol:Counter --broadcast \
--rpc-url "$ETH_RPC_URL" --private-key "$JOLTZU_DEV_KEY"
The key is a public local devnet fixture. The pool refuses any transaction with a gas limit above 1,000,000, so a very large contract may need splitting into libraries or smaller contracts. Copy the deployment's contract address:
export JOLTZU_COUNTER=0x_REPLACE_WITH_DEPLOYED_ADDRESS
cast send "$JOLTZU_COUNTER" 'setNumber(uint256)' 42 \
--private-key "$JOLTZU_DEV_KEY"
cast call "$JOLTZU_COUNTER" 'number()(uint256)'
Replace the address placeholder before running. The read should return 42 after the write succeeds.
Deployment policy
Ordinary CREATE/CREATE2 uses the journaled host. If genesis enables runtime eligibility, factory-created output and delegated implementation code must satisfy that profile too. A wallet screening override does not authorize ineligible runtime code.
Check EVM/RPC boundaries, native services, and the configured network policy before moving beyond local development. Use the Solidity SDK installation and remapping when your contract calls native precompiles. Public endpoints in these docs are proposals.