# assume_native_balance

Declares the exact native balance, in Wei, supplied for one address in a PROGRAM's initial state.

Canonical HTML: <https://determica.com/docs/functions/assume_native_balance>

- Kind: scalar function
- Category: [Simulation](/docs/category/simulation.md)
- Tags: Program Compiler, Simulate

Declares the exact native balance, in Wei, supplied for one address in a PROGRAM's initial state.

## Overload 1: assume_native_balance(ADDRESS, UINT256, VARCHAR)

```sql
assume_native_balance(ADDRESS, UINT256, VARCHAR)
```

Declares the exact native balance, in Wei, supplied for one address in a PROGRAM's initial state.

- Kind: scalar
- Execution context: Offline
- Behavior: Transform
- Execution modes: Offline
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: One Per Input
- Determinism: Deterministic
- Return shape: Scalar
- Schema stability: Fixed
- Stability: Stable
- Side effects: None documented

### Inputs

- `address` (ADDRESS; required; positional) — Address whose initial native balance is fixed by this assumption.
- `amount` (UINT256; required; positional) — Exact UINT256 native balance in Wei.
- `reason` (VARCHAR; required; positional) — Non-NULL valid UTF-8 text recorded in the assumption manifest; it does not affect the semantic assumption root.

### Returns

Native-balance ASSUMPTION

Returns an ASSUMPTION for one balance coordinate. PROGRAM rejects another assumption for that coordinate.

- `assumption` (ASSUMPTION)

Native-balance ASSUMPTION. Returns an ASSUMPTION for one balance coordinate. PROGRAM rejects another assumption for that coordinate.

### Examples

_Local SQL · Local_

```sql
WITH actors AS (
  SELECT
    '0x1000000000000000000000000000000000000001'::ADDRESS AS sender,
    '0x2000000000000000000000000000000000000002'::ADDRESS AS writer
),
authored AS (
  SELECT [
    -- Funds the one-Wei transfer in step zero.
    assume_native_balance(sender, 1000000::UINT256, 'funds step value transfer'::VARCHAR),
    -- Supplies the transaction context consumed by step zero.
    assume_nonce(sender, 0::UBIGINT, 'step sender nonce'::VARCHAR),
    assume_no_code(sender, 'step sender is an EOA'::VARCHAR),
    assume_native_balance(writer, 0::UINT256, 'receives step value'::VARCHAR),
    assume_nonce(writer, 0::UBIGINT, 'call target nonce'::VARCHAR),
    -- This runtime consumes calldata and stores its first word.
    assume_code(writer, '0x60003560005500'::BYTES, 'step code stores calldata word'::VARCHAR),
    assume_storage(
      writer,
      '0x0000000000000000000000000000000000000000000000000000000000000000'::BYTES32,
      '0x0000000000000000000000000000000000000000000000000000000000000000'::BYTES32,
      'step writes slot zero'::VARCHAR
    )
  ] AS assumptions,
  execute_call(
    sender,
    writer,
    '0x000000000000000000000000000000000000000000000000000000000000002a'::BYTES,
    1::UINT256,
    100000::UBIGINT
  ) AS step
  FROM actors
),
candidate AS (
  SELECT program(assumptions, [step]) AS program, assumptions
  FROM authored
)
SELECT
  len(assumptions)::INTEGER AS assumption_count,
  program IS NOT NULL AS runnable
FROM candidate;
-- => [{"assumption_count":7,"runnable":"true"}]
```

## Guidance

### PROGRAM validation

Duplicate balance assumptions for the same address fail when PROGRAM is constructed.

## Related functions

- [call_context](/docs/functions/call_context.md) — See Also
- [execute_call](/docs/functions/execute_call.md) — See Also
- [program](/docs/functions/program.md) — See Also
- [observe](/docs/functions/observe.md) — See Also
- [run](/docs/functions/run.md) — See Also
