Skip to the page

Demo chain: example blocks

—

Pebble Jar

Holds BUN for whoever puts it in, and hands back no more than they put in. It is a made-up contract, running in your browser so you can try the page without a node. It is not deployed on any chain.

BuiltThe node runs EVM contracts on the main line behind a genesis switch; these six contracts are examples in your browser, not deployed ones. Status

Address
c861c4…9121a0
Kind
Token vault
Deployed at
41,872
Calls
318
Source
Verified at 41,990
Design preview: example data, not from a chain
The contract, as a machineDesign preview: example data, not from a chain
Held
600 BUN
Deposits
mossy-otter420 BUNtin-lantern150 BUNnorth-window (you)30 BUN
Most per call
50 BUN
Storage, 3 cellswired, waiting

Out tray

Press a key above. A question answers at once; a call is signed first.

Call a method

You are north-window (you) with 12,500 example BUN, at block 48,210.

How much an account has in the jar.

One of the example accounts.

Answers at once. Nothing is signed.

What it offers, and what it holds

The interface is every way in. The storage is everything it remembers. A call can only change the cells its method is wired to.

Design preview: example data, not from a chain

Interface

  • depositOf(account: account)question

    How much an account has in the jar.

  • deposit(amount: amount of BUN)call

    Put BUN in the jar under your own name.

  • withdraw(amount: amount of BUN)call

    Take back some of what you put in.

Storage

HeldEverything in the jar. Always the sum of the deposits.
600 BUN
DepositsWhat each account may take back.
mossy-otter420 BUNtin-lantern150 BUNnorth-window (you)30 BUN
Most per callSet at deploy. One withdrawal cannot take more.
50 BUN

Call history

Calls that became final, newest first. Questions are not listed: they change nothing and are never put in a block.

Design preview: example data, not from a chain
CallMethodArgumentsCallerBlockWhat it did
318deposit30 BUNnorth-window (you)48,01130 BUN moved into the jar
317withdraw25 BUNtin-lantern47,90425 BUN paid back to tin-lantern
316deposit120 BUNmossy-otter47,655120 BUN moved into the jar

Showing the latest 3 of 318 example calls.

Source

This sketch was rebuilt and matched, part for part, with the code the example validators hold.

Verified at block 41,990
Design preview: example data, not from a chain
contract Pebble Jar
  set at deploy
    most per call : amount of BUN
  holds
    held     : amount of BUN
    deposits : amount of BUN for each account
  anyone may ask depositOf(account)
    answer deposits[account]
  anyone may call deposit(amount), paying amount
    add amount to deposits[caller] and to held
  anyone may call withdraw(amount)
    refuse when amount is more than deposits[caller]
    refuse when amount is more than most per call
    take amount from deposits[caller] and from held
    pay amount to caller
Notation
Sketch edition 2, an illustrative notation made for this preview
Storage
Packed cells
Set at deploy
most per call = 50 BUN