Skip to main content
SplitBot exposes its functionality through smart contracts and Telegram bot commands. The contracts are deployed on Ethereum Sepolia. The bot uses polling (not webhooks) and stores state in SQLite.

Smart contracts

SplitEscrowFactory

Deployed at 0xa247646Dd0d8a2042aD5Cd440A26358457494aa7 on Sepolia.

createSplit

Deploys a new SplitEscrow at a deterministic CREATE2 address.
Emits SplitDeployed(escrow, creator, salt, target, amountEach, deadline).

predictAddress

Compute the address a createSplit call would produce before deploying.

INIT_CODE_HASH

Returns the hash of the SplitEscrow creation bytecode. Used for off-chain address prediction.

SplitEscrow

One instance per split. Deployed by the factory with immutable parameters.

Constants

State variables

deposit

Deposit the required amount as a registered participant.
  • Reverts if the caller is not a participant, already paid, deadline passed, or amount is insufficient.
  • Auto-executes when all participants have deposited.

receive

Accepts direct ETH transfers from participants. Calls the same internal logic as deposit().

refund

After the deadline, queue all deposits for individual withdrawal. Anyone can call.
Emits RefundQueued for each participant with a pending deposit.

cancel

Creator-only. Queue refunds before the deadline.
Emits Cancelled(msg.sender) and RefundQueued for each deposited participant.

claimRefund

Withdraw a queued refund or failed payout.
Emits RefundClaimed(msg.sender, amount).

pushPending

Claim a queued balance on behalf of another address. Useful when the recipient is a contract without a claimRefund wrapper.

sweepDust

Send leftover dust (from overpay) to the target after execution.
Emits DustSwept(target, dust).

getStatus

Return the full split status in a single call.

Events

Bot commands

Mini App endpoints

The Mini App is a static site. It interacts with the blockchain directly through ethers.js and communicates with the bot via Telegram WebApp sendData. The bot’s webapp_data_handler receives two action types: No HTTP API endpoints are exposed by the bot itself. All on-chain reads and writes happen through the web3 provider in the bot or ethers.js in the Mini App.
The Mini App reads split status directly from the smart contract using getStatus() through a public Sepolia RPC endpoint. It does not call the bot’s database for live status.