Ride

1 program Added 2026-02-10T11:55:18Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit f0114c6cdd · authored 2026-02-10T12:56:14+01:00 · agent claude-code · model sonnet

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Halide (0.27)Ring (0.20)Rune (0.20)Blade (0.18)Maude (0.18)

LLM-contributed programs

Deposit and Withdraw DApp

Provenance: commit f0114c6cdd · authored 2026-02-10T12:56:14+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.ride · added: 2026-02-10T11:55:18Z
{-# STDLIB_VERSION 5 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}

@Callable(i)
func deposit() = {
  let pmt = i.payments[0].value()
  (
    [
      IntegerEntry(toBase58String(i.caller.bytes), pmt)
    ],
    unit
  )
}

@Callable(i)
func withdraw(amount: Int) = {
  let currentKey = toBase58String(i.caller.bytes)
  let currentAmount = this.getInteger(currentKey).valueOrElse(0)
  let newAmount = currentAmount - amount

  if (amount < 0)
    then throw("Can't withdraw negative amount")
  else if (newAmount < 0)
    then throw("Not enough balance")
  else
    (
      [
        IntegerEntry(currentKey, newAmount),
        ScriptTransfer(i.caller, amount, unit)
      ],
      unit
    )
}

@Verifier(tx)
func verify() = {
  sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
}

Contribute — propose a file extension

Tell us where to find evidence about Ride (mapped to pl/ride). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Ride/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← ricscript rider-editor →